Answered

How to revert graphs.

Basically, don't erase/delete anything until you're sure you're done with it. Save the line handle(s) to the lines when drawn; ...

How to revert graphs.

Basically, don't erase/delete anything until you're sure you're done with it. Save the line handle(s) to the lines when drawn; ...

ein Tag ago | 1

Answered

Matrix Dimensions must agree

The + operator only works for the class string catenation, not character strings. path_new="C001H001S00040" + i3 + ".tif"; ...

Matrix Dimensions must agree

The + operator only works for the class string catenation, not character strings. path_new="C001H001S00040" + i3 + ".tif"; ...

3 Tage ago | 0

Answered

psd estimation using welch's method

To compute via Welch's overlapping estimator, yes. Of course, you can compute PSD from base product directly with FFT() and ch...

psd estimation using welch's method

To compute via Welch's overlapping estimator, yes. Of course, you can compute PSD from base product directly with FFT() and ch...

3 Tage ago | 1

| accepted

Answered

Correlation between two non-linear vectors

Can I trust the function corrcoef?" Well, you can trust it to have computed what it says it computes which is the estimate of ...

Correlation between two non-linear vectors

Can I trust the function corrcoef?" Well, you can trust it to have computed what it says it computes which is the estimate of ...

4 Tage ago | 0

Answered

Trasform cell arrays vector into a double vector

All the gyrations with tables are apparently totally unnecessary and just added complexity... pluto_test=cell2mat(c2); pippo_t...

Trasform cell arrays vector into a double vector

All the gyrations with tables are apparently totally unnecessary and just added complexity... pluto_test=cell2mat(c2); pippo_t...

4 Tage ago | 0

Answered

Displaying special characters in dialog box

Dialogs don't have 'Interpreter' property, unfortunately, and they're not full-blown text objects underneath. Have to hardcode ...

Displaying special characters in dialog box

Dialogs don't have 'Interpreter' property, unfortunately, and they're not full-blown text objects underneath. Have to hardcode ...

4 Tage ago | 0

Answered

Importing Histogram bin width & bin frequency data without access to underlying raw data

Just read the data in as is; no need for Excel. I'd use bin midpoints altho will make little difference on fitting is probably ...

Importing Histogram bin width & bin frequency data without access to underlying raw data

Just read the data in as is; no need for Excel. I'd use bin midpoints altho will make little difference on fitting is probably ...

4 Tage ago | 0

Answered

Why fileID value is -1 in fopen function despite that it seems to have opened and read the file content successfully?

Also, too: Your logic doesn't immediately continue to the next file in the for...end loop after the error message--it just does...

Why fileID value is -1 in fopen function despite that it seems to have opened and read the file content successfully?

Also, too: Your logic doesn't immediately continue to the next file in the for...end loop after the error message--it just does...

4 Tage ago | 0

Answered

Wrong axis value in correlation plot

It's a confusing labeling problem -- the ticks aren't actually the variables on the plot for the histogram but for the scatter p...

Wrong axis value in correlation plot

It's a confusing labeling problem -- the ticks aren't actually the variables on the plot for the histogram but for the scatter p...

4 Tage ago | 1

Answered

Occurence with 2 variables

HD=[HsW;DirW].'; % combine data for convenience Pattern=[HD(1:2,:)]; % the look...

Occurence with 2 variables

HD=[HsW;DirW].'; % combine data for convenience Pattern=[HD(1:2,:)]; % the look...

4 Tage ago | 0

Answered

how can i display only two decimals in uitable MATLAB?

Don't have that much flexibility with numeric formattting in the object, sorry. uitable uses the same setting as the command wi...

how can i display only two decimals in uitable MATLAB?

Don't have that much flexibility with numeric formattting in the object, sorry. uitable uses the same setting as the command wi...

5 Tage ago | 0

Answered

A clever way to have dynamic output variables from a function??

Do NOT write code with metadata in variable names nor sequentially-numbered or lettered ones for starters...use an array. Then ...

A clever way to have dynamic output variables from a function??

Do NOT write code with metadata in variable names nor sequentially-numbered or lettered ones for starters...use an array. Then ...

6 Tage ago | 1

Answered

I want to my contour plot to look like the one from mathematica?

One of the examples from ML doc (peaks function) with x/y limits expanded to more or less mimic the kind of figure you have resu...

I want to my contour plot to look like the one from mathematica?

One of the examples from ML doc (peaks function) with x/y limits expanded to more or less mimic the kind of figure you have resu...

7 Tage ago | 0

Answered

Skipping 1st two calculations of a loop

for i=1:n for j=1:k C(i,j)= a(i)+b(j)+c(j) end end C(1,1:2)=[C11 C12]; % fixup special cases

Skipping 1st two calculations of a loop

for i=1:n for j=1:k C(i,j)= a(i)+b(j)+c(j) end end C(1,1:2)=[C11 C12]; % fixup special cases

9 Tage ago | 0

| accepted

Answered

Inserting number where vector changes from positive to negative

On the chance the crystal ball foresaw the answer to the above questions, try the following (or perturbations thereof)... x = [...

Inserting number where vector changes from positive to negative

On the chance the crystal ball foresaw the answer to the above questions, try the following (or perturbations thereof)... x = [...

9 Tage ago | 0

Answered

Read only numerical values from mixed text file

Something like fmt1='NODes %n ELEments %n'; % info line nodes, elements in file fmt2=repmat('%f',1,4); fmt3=repmat('...

Read only numerical values from mixed text file

Something like fmt1='NODes %n ELEments %n'; % info line nodes, elements in file fmt2=repmat('%f',1,4); fmt3=repmat('...

9 Tage ago | 0

Answered

Index on a matrix

xlo=0.000020; xhi=0.000025; d=dir('*.csv'); nFiles=numel(d); % how many are there? vt=zeros(nF...

Index on a matrix

xlo=0.000020; xhi=0.000025; d=dir('*.csv'); nFiles=numel(d); % how many are there? vt=zeros(nF...

9 Tage ago | 0

Answered

How to copy first column, and replace other columns with this first column values in same array in MATLAB? (array size can vary)

"copy what ever is in the first column (first column will have each row with different values and have n number of rows in it), ...

How to copy first column, and replace other columns with this first column values in same array in MATLAB? (array size can vary)

"copy what ever is in the first column (first column will have each row with different values and have n number of rows in it), ...

9 Tage ago | 0

| accepted

Answered

Multivariate regression betas stock returns

OK, just add as new Answer since preceding getting rather long...try this out; seems to work ok here on the sample dataset. NB:...

Multivariate regression betas stock returns

OK, just add as new Answer since preceding getting rather long...try this out; seems to work ok here on the sample dataset. NB:...

10 Tage ago | 0

| accepted

Answered

Print OCR results to text file

AHA! The one about "Expected one output from a curly brace or dot indexing expression, but there were 544 results." is helpful!...

Print OCR results to text file

AHA! The one about "Expected one output from a curly brace or dot indexing expression, but there were 544 results." is helpful!...

11 Tage ago | 0

Answered

Multivariate regression betas stock returns

Just saw something overlooked last night... if size(vars,1) > 15 I think there's your problem -- you only calculate a re...

Multivariate regression betas stock returns

Just saw something overlooked last night... if size(vars,1) > 15 I think there's your problem -- you only calculate a re...

11 Tage ago | 0

Answered

How to Convert this time series data to YYYY-MM-DD HH:MM format

dt=datetime(Year,1,day,fix(time/100),mod(time,100),0); ADDENDUM: Using Star's array... A = [2019 137 1650; 2019 144 1740]; ...

How to Convert this time series data to YYYY-MM-DD HH:MM format

dt=datetime(Year,1,day,fix(time/100),mod(time,100),0); ADDENDUM: Using Star's array... A = [2019 137 1650; 2019 144 1740]; ...

11 Tage ago | 0

Answered

Print OCR results to text file

To write cell output with fprintf, you must dereference the cell content "use the curlies, Luke!". fprintf(fileID, '%s\r\n', te...

Print OCR results to text file

To write cell output with fprintf, you must dereference the cell content "use the curlies, Luke!". fprintf(fileID, '%s\r\n', te...

11 Tage ago | 0

Answered

how to create a normal distribution matrix?

NRV=normrnd(0,1,120*320,1); NRV=reshape(interp1([min(NRV);max(NRV)],[0;255],NRV),120,[]);

how to create a normal distribution matrix?

NRV=normrnd(0,1,120*320,1); NRV=reshape(interp1([min(NRV);max(NRV)],[0;255],NRV),120,[]);

12 Tage ago | 0

Answered

Transfer formula and images from Excel to Matlab

You'd have to use COM to drive Excel to read formulae from cells or, alternatively, for a couple cases where needed to get such ...

Transfer formula and images from Excel to Matlab

You'd have to use COM to drive Excel to read formulae from cells or, alternatively, for a couple cases where needed to get such ...

12 Tage ago | 0

Answered

Set individual bar color, with specifying y axis range and show tick as well.

To set individual bar colors-- hBar=bar(tensile); % do the bar plot, save the handle hBar.FaceColor='flat'; ...

Set individual bar color, with specifying y axis range and show tick as well.

To set individual bar colors-- hBar=bar(tensile); % do the bar plot, save the handle hBar.FaceColor='flat'; ...

12 Tage ago | 0

Answered

How to supplement the matrix?

Adding to Stephen's answer Matlab syntax, the crystal ball says for i = 1:length(d)-1 % Error 1100 1099 if g(i)-50>= g(i...

How to supplement the matrix?

Adding to Stephen's answer Matlab syntax, the crystal ball says for i = 1:length(d)-1 % Error 1100 1099 if g(i)-50>= g(i...

12 Tage ago | 0

Answered

How can I merge a numeric matrix (1 column) to an existing numeric matrix?

Presuming the B vector already exists to match the right size, simply knowing the row number is sufficient... B(sc:end,2)=A;

How can I merge a numeric matrix (1 column) to an existing numeric matrix?

Presuming the B vector already exists to match the right size, simply knowing the row number is sufficient... B(sc:end,2)=A;

13 Tage ago | 0

| accepted

Answered

plot with two datetick axis

Don't use datenum and datetick, use datetime instead for which plot has builtin support. You should be able to create two indep...

plot with two datetick axis

Don't use datenum and datetick, use datetime instead for which plot has builtin support. You should be able to create two indep...

14 Tage ago | 0

Answered

Can anyone tell me why this function call : [x, ithist] = broyden(f,x0); within my script says x is undefined? broyden.m is supposed to calculate and output x. Am I supposed to define it in my script, because that doesn't seem right or make sense. An

x0 =[0.00001;1]; f = @(u) [(sqrt((x(1) - xs)^2 + (y(1) - u(1))^2 + (zt(1) - zs)^2)/v )- (u(2)); ... ...

Can anyone tell me why this function call : [x, ithist] = broyden(f,x0); within my script says x is undefined? broyden.m is supposed to calculate and output x. Am I supposed to define it in my script, because that doesn't seem right or make sense. An

x0 =[0.00001;1]; f = @(u) [(sqrt((x(1) - xs)^2 + (y(1) - u(1))^2 + (zt(1) - zs)^2)/v )- (u(2)); ... ...

15 Tage ago | 0