Risposto
How do I display a number as a percetage within a table?
No can do...and leave as a number, anyways. tables are calculational tools and MATLAB is NOT a spreadsheet and the view of the ...

circa 4 anni fa | 0

Risposto
Appdesigner: Execute callback from m file
What do you mean, specifically? appdesigner calls a given callback function; that function can call anything, m-file or not; bu...

circa 4 anni fa | 0

Risposto
I am trying to certain points of data from structs which are in a cell
It's an array of struct, use arrayfun to iterate over the collection of objects... BW2{k} = bwconncomp(BW1{k}); N{k}=arrayfun(...

circa 4 anni fa | 0

Risposto
Intersection of two curves
One approach might be something like R_PF=mean(P./f); % the average scaling between the two fn1=@(x)interp1...

circa 4 anni fa | 0

Risposto
Letter to numerb: Create a new 'if' variable to change 'Y' and 'N' to 1 and 0
>> categorical({'Y';'N';'Y'},{'N';'Y'},{'0';'1'}) ans = 3×1 categorical array 1 0 1 >> matches({'Y';'...

circa 4 anni fa | 0

Risposto
How to copy a complex number in a cell with different sign of imaginary part?
v=[x conj(x{:})];

oltre 4 anni fa | 1

| accettato

Risposto
Simulink: Use Enumeration As Index
Try something like idx=find(ismember(enumeration(Example),Example.value999)); A(idx) SIDEBAR: MATLAB enumeration classes are...

oltre 4 anni fa | 0

Risposto
FFT from .csv voltage and current data file
readmatrix and fft have examples that match up with your Q? -- if you have Signal Processing Toolbox, then there are more user-f...

oltre 4 anni fa | 0

Risposto
how to import csv file with along with its headers in the matlab?
Alternatively to one of @Star Strider's solutions, use the result of your version's readtable as the starting point, then read a...

oltre 4 anni fa | 0

Risposto
Customise axis ticks and ticks labels with exponential notation
See <Include Superscript and Subscript in Axis Labels> example at <xlabel> Moral: Read doc including looking at examples...

oltre 4 anni fa | 0

| accettato

Risposto
Plotting rows of a specific column of similar value on separate figures
When you want a new figure for every one, that pretty-much means splitapply isn't going to be all that handy because you can't d...

oltre 4 anni fa | 0

| accettato

Risposto
How to Change the Exponential Scale in axis to linear scale?
Guessing at what you mean, precisely, try something like-- Dalton=8.227*exp(1)+6*exp(-7.9591*exp(1)*y); % use MATLAB vec...

oltre 4 anni fa | 0

| accettato

Risposto
Load data (.csv or .isf) from any directory to process in Matlab Standalone Application (App Designer)
Well, you got the filename and path to it, but you didn't use the path -- ... D1= readmatrix(fullfile(path,filename)); ... Y...

oltre 4 anni fa | 0

Risposto
Plotting rows of a specific column of similar value on separate figures
Try something like g=findgroups(zt(:,1)); hAx=axes;hold on splitapply(@(y)plot(y),zt(:,3),g) legend("Group "+unique(g)) If ...

oltre 4 anni fa | 0

Risposto
Matlab replaces missing doubles by zeros instead of NaNs
The "WHY" goes back to original design of MATLAB and was the chosen behavior when first invented. To change that behavior now w...

oltre 4 anni fa | 0

Risposto
Plot multiple variables with stackedplot with data for the x-axis?
From the doc, about the third input syntax description is stackedplot(___,'XVariable',xvar)

oltre 4 anni fa | 0

Risposto
How to find the frequencies of a time series which contain datetime ?
I think it's absurd to even think about peforming spectral analysis on such a intermittently-sampled signal, but the only thing ...

oltre 4 anni fa | 0

Risposto
how to plot hexagon inside boundary?
As a starting point... N=6; t=2*pi*(1/(2*N):1/N:1).'; x=cos(t);y=sin(t); fill(x,y,'k') axis square hold on hH=fill(x+2*ma...

oltre 4 anni fa | 1

| accettato

Risposto
Excel Spreadsheet Autofill Range (Multiple rows) via MATLAB command
Start by creating a macro that does what you want done and look at in in VBA -- I usually just paste it into the MATLAB editor a...

oltre 4 anni fa | 0

| accettato

Risposto
Hello everyone, I want to restrict the domain of a vector to return it to a smaller data set. For example, X between 2 and 7
Perfect use for my utility function iswithin >> x=1:10; >> x=x(iswithin(x,2,7)) x = 2 3 4 5 6 7 >>...

oltre 4 anni fa | 0

| accettato

Risposto
How to change the font size of xtick and ytick with scientific notation on the side?
x=linspace(0,2.1E-4); y=randn(size(x)); >> plot(x,y) >> hAx=gca; >> hAx.FontName='Times New Roman'; >> hAx.FontSize=12; >> ...

oltre 4 anni fa | 0

| accettato

Risposto
Plot with x-axis label in Hour instead of Second
tT=readtable("Q.csv"); tT=addvars(tT,seconds(1:height(tT)).','before','Temp','NewVariableNames','T'); tT.T.Format='h'; plot(t...

oltre 4 anni fa | 0

| accettato

Risposto
I want to create a bar3 plot for the contribution of two parameters as like in figure
OK...had a few minutes -- try Z=B(3:end,3:end); % save the data portion of the overall arrray; MATLAB will, I think) just...

oltre 4 anni fa | 0

Risposto
Find country code from city name
Postal codes helps for many countries, yes...although there are some that either don't have or don't use one, if all your addres...

oltre 4 anni fa | 0

Risposto
index exceed the number of arrays elements
length_collective=length(Collective); %equals to 124 length_single=length(single); %equals to 393 for i=1:1:length(Collective)...

oltre 4 anni fa | 1

Risposto
Why does num2str() of 138.97 return 138.96999999999999886?
Wrong expectation for floating point numbers -- short story is if a fraction is not exactly representable by 1/2^n, it'll not be...

oltre 4 anni fa | 0

| accettato

Risposto
Merge 864 single column text files and 60,000 rows in single file. How to get a matrix with 60000 rows and 864 column
It would be simpler if you had named the files so they would sort lexically as C001, C002, ... etc., but it's still not too bad....

oltre 4 anni fa | 0

| accettato

Risposto
A compact way to find single digit numbers (i.e. numbers between 0 and 9) and replace them with two digit numbers
For what purpose and in what context? You will only be able to show the leading zeros if you convert the numeric values to some...

oltre 4 anni fa | 0

Risposto
Legend command not working when plotting figure
Try something like figure pbaspect([1 1 1]) loglog(ElectronEnergy(:), [ElectronDifFlue(:) ElectronSolMinDifFlue(:)], 'LineWid...

oltre 4 anni fa | 0

Risposto
Delete selected worksheet from Excel
OK, I'll create new Answer to move out of the previous longish comments and to reflect what I now (think) I know that I wasn't f...

oltre 4 anni fa | 0

Carica altro