Respondida
cumulative sum of an array
>> N N = 5 >> S=sum(reshape(b,[],length(b)/N)) S = 15 30 15 30 >> >> S=cumsum(reshap...

más de 8 años hace | 0

Respondida
Colored error bar plot with X axis labels
The problem is that |bar| as you've used it draws only the one bar as an individual element so there aren't any ticks set for mo...

más de 8 años hace | 0

| aceptada

Respondida
Why is my plot function does show any graph?
In for k = 1:21; numerator = new_wavelength(j,11)-new_wavelength(j,k) denominator = Delta_lambda/2; Denom = ...

más de 8 años hace | 0

| aceptada

Respondida
Index exceeds array bounds
No idea what really trying to accomplish but n = 6; f = zeros(n); % f=nxn array zeros for i = n % ...

más de 8 años hace | 0

Respondida
how can i read thousands of nc4 files in one go using loop
Convert to function and then just call it... function ncdinfo(nc_filename) ncid=netcdf.open(nc_filename,'nowrite'); ...

más de 8 años hace | 0

| aceptada

Respondida
3D stem plot colored by Z-value
Doesn't look easy; there's no _.CData_ property even using Yair's |UNDOCUMENTED| function to find any |stem3| properties that we...

más de 8 años hace | 2

Respondida
How to delete multiple row and column in matrix A and Delete row and column specified in matrix B?????????????/
On the assumption it really is to remove the full row/column, not the individual element, "Dead ahead" is sometimes the simplest...

más de 8 años hace | 0

Respondida
Indexing with different sized vectors
arrayfun(@(ix,n) mean(X(ix:ix+n-1),'omitnan'), Idx,Duration); Alternatively, instead of generating the start index and coun...

más de 8 años hace | 0

Respondida
How to find a value in x axis in 1d plot with a given y
>> mx=max(x); >> L=length(x); >> mxIxHalf=interp1(x(end-10:end),L-10:L,mx/2) ans = 26.9288 >> Have to us...

más de 8 años hace | 1

Respondida
nlinfit function, not enough input arguments
x = nlinfit(X,y,myfun,xstart) Is passing the function as an argument instead of the function _handle_; hence it's missing...

más de 8 años hace | 0

Respondida
Problems with a nested For Loop and max value
Em(a,b) = sum(Gm,1); % ERROR! “Subscripted assignment dimension mismatch” sum(Gm) (equivalent to sum(Gm,1) ) will retu...

más de 8 años hace | 0

| aceptada

Respondida
h5read incorrectly reading exponents
Resolve what, precisely? >> 1.3675214E7 ans = 13675214 >> whos ans Name Size Bytes Class Att...

más de 8 años hace | 0

| aceptada

Respondida
How do you find a sinusoidal curve on given data without using curve fit tool box?
Then you have to do it yourself with the nonlinear optimization routines...the example is at <https://www.mathworks.com/help/mat...

más de 8 años hace | 0

Respondida
How can i change 0.25*0.25 degree data file(matrix of 241*241) into 1.0*1.0 degree data file.
'Pends on what you want the result to represent... junPPTdecimated=jun_Ppt_monthly(1:4:end,1:4:end); % every fourth eleme...

más de 8 años hace | 1

| aceptada

Respondida
What is the best way to downsample a tall timetable? Neither "decimate" nor "retime" seems to work.
The _newTimeStep_ or _newTimes_ input parameters could be used for the purpose; _newTimeStep_ is a fixed time step so that ...

más de 8 años hace | 0

Respondida
write vectors in cell array to excel
Frankly, the easiest way would be to start with a normal array of nan(50,MaxRowLength) and then fill each row with the results a...

más de 8 años hace | 0

Respondida
Importing Numerically Named Excel Files into MATLAB
The best solution is to not name files that way...when creating them use a format such that leading zeros are filled in the nume...

más de 8 años hace | 0

| aceptada

Respondida
Plotting a box plot and a time series on the same graph ? as a distribution over time. boxplot(reshape(fluxO2tom01and23,4,[])); and plot(o_optode_mean1,1:196)
I answered this in the previous Q? in response to the comment after you said you didn't have |yyaxis|, Rebecca... <https://www.m...

más de 8 años hace | 0

| aceptada

Respondida
Reading huge number of excel files in a loop
All that function is is a loop around |intersect| one vector at a time; that's all you need must do, there's no need to put all ...

más de 8 años hace | 0

Respondida
How to implement ||Wi||^2 = 1 for all i ?
Read doc norm

más de 8 años hace | 0

Respondida
How To extract a matrix from the text file?
fid=fopen('yourfile'); while ~feof(fid) l=fgetl(fid); if ~isempty(strfind(l,'begin')), break, end end array...

más de 8 años hace | 0

| aceptada

Respondida
How do I merge 3 figures from 3 different programs in a single figure ?
Syntax for |copyobj| is two arguments, the handle (vector) of things to retrieve and the handle of the target. I've no idea w...

más de 8 años hace | 1

Respondida
I need to make a box plot, I am stuck making more than one
boxplot(reshape(date(4,[])) or, somewhat less cryptic perhaps if you are using an actual |timeseries| object with calendar ...

más de 8 años hace | 1

| aceptada

Respondida
How can I add errorbars to a log-log plot?
Well, what is the log() of a negative value supposed to be? You didn't show the values so we can't tell but clearly value-err...

más de 8 años hace | 0

Respondida
Different values of datnumber for same date-time?
It's the result of floating point rounding in the two different ways you generated the datenum values -- In full_data_ti...

más de 8 años hace | 1

| aceptada

Respondida
Importing values from excel
_"...It says NaN for cells such as 'DFX' or '78669-87'."_ As rightfully it should for numeric values; those aren't numbers bu...

más de 8 años hace | 0

Respondida
How can i find the maximum value of the first element in a stack of matrices?
You don't say or show how |A, B, C| were obtained, but therein is the heart of your problem -- do _not_ create sequentially-name...

más de 8 años hace | 1

| aceptada

Respondida
How to import variable names array from Excel as symbolic variables?
Why symbolic variables; why not simple variables? It's generally an indication of a lack of structure in an algorithm to have...

más de 8 años hace | 0

| aceptada

Respondida
how I can get fundamental signal in 50 Hz using FFT (fast Fourier transformer)
As David's modification would show, there's nothing wrong with the code for the frequency |if| the signal |R11voltage| was actua...

más de 8 años hace | 0

Cargar más