Respondida
Scientific notation at y-axis with "ax.YAxis.Exponent"
Well, here's a crude first pass... expn=floor(log10(yticks)); mant=yticks./10.^(expn); lbls=cellstr(num2str([mant;expn].','%d...

más de 5 años hace | 0

| aceptada

Respondida
Scientific notation at y-axis with "ax.YAxis.Exponent"
I don't see a user-settable format to force the notation (although I didn't use Yair's getundoc to poke) with arbitrary tick val...

más de 5 años hace | 0

Respondida
FFT, dominant frequency doesnt match time domain?
Your problem is simply that the dominant frequency isn't the same as one of the frequency bin midpoints depending on the number ...

más de 5 años hace | 2

| aceptada

Respondida
Change one line in Excel file
I'd avoid xlswrite and use writecell instead. Use the 'Range' parameter to put in the right place and not disturb anything else...

más de 5 años hace | 0

Respondida
How to find the find the pattern in each row of Matrix?
A=[A;A(3,:)]; % make sure one row has same pattern % the engine B=(A~=0); ...

más de 5 años hace | 1

Respondida
How to make segmented regression line and determine the breakpoints?
I've answered this several time in the past, but never think to keep a link... https://www.mathworks.com/matlabcentral/answers/...

más de 5 años hace | 0

Respondida
Conditional Scatter plotting based on third data set
>> SX=1*all(M==1)+2*(any(M==2)&any(M==3))+3*all(M==3) SX = 2 1 2 1 3 >> Create categorical variable fr...

más de 5 años hace | 0

Respondida
callculating values using cfit object with multiple p values
I don't see any syntax by which to do that with the coefficents for multiple fits stored that way and the doc for cfit explicitl...

más de 5 años hace | 0

Respondida
While loop to get a specific section of data
Far easier if you would attach a (small) sample of the dataset, but the general idea would be thresholdUp=1; ...

más de 5 años hace | 0

| aceptada

Respondida
How to count "gaps" consisting of designated values in a vector and obtain start and end indices?
v=sprintf('%d',ismember(sample_data_vector,invalid_values)|isnan(sample_data_vector)); iStart=strfind(v,'01')+1; iEnd=strfind(...

más de 5 años hace | 0

Respondida
Plotting multiple boxplots in same window...array for each boxplot is not the same length...causing error
Two ways to do it -- Use grouping variables and catenate the data into one long vector-- Data=[BoxSecurity; BoxWidefield_123;...

más de 5 años hace | 0

Respondida
Problem with duplicated points in Matlab.
You'll find that numel(unique(data(:,1))) < size(data,1) numel(unique(data(:,2))) < size(data,1) for one or both expressions....

más de 5 años hace | 1

| aceptada

Respondida
How to ignore lines in file via rmmissing?
Don't create sequentially-named variables, use the array MATLAB so conveniently provided you... filename1= 'TEST.xlsx' %arxeio ...

más de 5 años hace | 0

Respondida
How do i insert seconds in a timeseries data when the frequency of the data is inconsistent?
indx=[0;find(minutes(diff(TT.Time)));height(TT)]; % find change locations indices N=diff(indx); ...

más de 5 años hace | 0

Respondida
Confusino regarding statistical tests for given distribution
You need to examine what the default parameters of the function return -- >> [h,p,stats]=chi2gof(data) h = 1.00 p ...

más de 5 años hace | 0

Respondida
Designate order of categorical array?
You have to create an ordinal categorical array of the desired ordering of magnitudes to force other than the alphabetic orderin...

más de 5 años hace | 1

| aceptada

Respondida
For loop not doing what I want it to
TT=table2timetable(path_data); % convert the table to a time table TT=retime(TT,unique(TT.time),'mean'); % retim...

más de 5 años hace | 0

| aceptada

Respondida
frequently used function for table variable
Don't pass a table to your function, have it accept numeric inputs and return same; then just call it with the table names. Muc...

más de 5 años hace | 1

Respondida
How to index/address the chart width and height using Position option in Text command?
pos=Geo.Position; % save as array x=pos(1)+pos(3)/2; % midpoint position horizontal y=pos(2)+pos(4)/2; % midpoint position...

más de 5 años hace | 1

| aceptada

Respondida
Code to calculate raw moments?
Don't really need a function for that although could wrap in one if desired -- It would just be M=x.^N; NB: N in such an expr...

más de 5 años hace | 0

Respondida
How to calculate data higher than monthly mean value for one year data set?
rowfun to the rescue. TT_15.Month=month(TT_15.DT1); % generate grouping variable; rowfun() needs it in table TT_HHWL15=row...

más de 5 años hace | 1

| aceptada

Respondida
the goto fortran90 command convert to matlab
OK, came back -- when indent code, the construct is more readily visible -- the two loops are completely independent and the fir...

más de 5 años hace | 1

Respondida
How to take average of matrices stored as cell array?
MATLAB is magic in such things... :) If your cell array is Irrad, then meanIrrad=mean(cat(3,Irrad{:}),3);

más de 5 años hace | 2

Respondida
How to get specific rows in a text file and store it in a matrix?
One of about a zillion ways...deliberately illustrating some newer features... opt=detectImportOptions('lageos1.txt','CommentS...

más de 5 años hace | 1

Respondida
How do I change the position of the axes permanently?
Taking a stab at the OP's meaning (thanks to the Crystal Ball having just been returned from the shop (yet) again...) Try set...

más de 5 años hace | 0

Respondida
Speed up search for matching strings
Only need one loop and I'd guess it'd be faster as written above if you didn't bother to remove the found elements--I suspect th...

más de 5 años hace | 0

| aceptada

Respondida
How to delete specific values from matrix
>> A=randi(30,5,5) % sample array to illustrate ans = 23 4 7 27 8 9 15 23 ...

más de 5 años hace | 0

Respondida
Largest column of a matrix
Try function v=maxivect(A) [~,ix]=max(arrayfun(@(i) norm(A(:,i)),[1:size(A,2)])); v=A(:,ix); end

más de 5 años hace | 0

| aceptada

Respondida
Why do I receive results mismatch in the FFT signal while using MATLAB built in FFT function? How can I able to rectify this?
If the fundamental frequency doesn't precisely match the frequency bins of the FFT, then the energy will be spread over multiple...

más de 5 años hace | 0

Respondida
Improving the Resolution in FFT
Look at documentation for nextpow2

más de 5 años hace | 0

| aceptada

Cargar más