Answered

Difficulty importing dates using readtable

The file doesn't match the format string -- it has a numeric value followed by two dates and who knows what else afterwards and ...

Difficulty importing dates using readtable

The file doesn't match the format string -- it has a numeric value followed by two dates and who knows what else afterwards and ...

3 hours ago | 0

Answered

TEXTSCAN not value, comma, space problem.

Use readtable instead with a FixedWidthImportOptions object. You can begin by seeing if detectImportOptions can figure it out o...

TEXTSCAN not value, comma, space problem.

Use readtable instead with a FixedWidthImportOptions object. You can begin by seeing if detectImportOptions can figure it out o...

4 hours ago | 0

Answered

how to solve exponential equation

opt= optimoptions('fsolve','Display','none'); X0=15; soln=arrayfun(@(e) fsolve(@(x) fnE(x)-e,X0,opt),ee); NB: There are two ...

how to solve exponential equation

opt= optimoptions('fsolve','Display','none'); X0=15; soln=arrayfun(@(e) fsolve(@(x) fnE(x)-e,X0,opt),ee); NB: There are two ...

4 hours ago | 0

Answered

how to solve exponential equation

fnE=@(x) 0.4075*exp(-((x-14.87)/11.39).^2) + 0.5621*exp(-((x-18.64)/27.74).^2); ezplot(fnE,[0 100]) hAx=gca; hL=hAx.Children;...

how to solve exponential equation

fnE=@(x) 0.4075*exp(-((x-14.87)/11.39).^2) + 0.5621*exp(-((x-18.64)/27.74).^2); ezplot(fnE,[0 100]) hAx=gca; hL=hAx.Children;...

1 day ago | 0

Answered

How to extract values from array

disp(hist_points{5}(1)); % for first element in cell 5 Read up in the documentation on cell arrays about dereferencing.

How to extract values from array

disp(hist_points{5}(1)); % for first element in cell 5 Read up in the documentation on cell arrays about dereferencing.

2 days ago | 0

| accepted

Answered

Adding Zeroes and Ones into a Vector

>> v=reshape([reshape(v,[],3),[0 0 1].'].',1,[]) v = 0 0 1 0 0 1 0 0 1 0 0 1 ...

Adding Zeroes and Ones into a Vector

>> v=reshape([reshape(v,[],3),[0 0 1].'].',1,[]) v = 0 0 1 0 0 1 0 0 1 0 0 1 ...

3 days ago | 2

| accepted

Answered

Nested FOR loops and creating text file (3d-layers) too slow.

So, as suspected, just generate the data to print and use the desired formatting string: % generate some sample data... A=1001...

Nested FOR loops and creating text file (3d-layers) too slow.

So, as suspected, just generate the data to print and use the desired formatting string: % generate some sample data... A=1001...

7 days ago | 0

| accepted

Answered

How to delete repeating column or duplicate column in MATLAB? of type Double

>> uA=unique(A); >> B=[uA;histc(A,uA)] B = 1 2 3 4 5 2 2 2 2 1 >> ADDENDUM: Ab...

How to delete repeating column or duplicate column in MATLAB? of type Double

>> uA=unique(A); >> B=[uA;histc(A,uA)] B = 1 2 3 4 5 2 2 2 2 1 >> ADDENDUM: Ab...

8 days ago | 2

Answered

Windows .NET Framework Update Breaks READTABLE()

Steven, the update was/is 2019-05 Security and Quality (HAH! -- dpb) Rollup for .NET Framework...(KB4499406) Published 5/14/201...

Windows .NET Framework Update Breaks READTABLE()

Steven, the update was/is 2019-05 Security and Quality (HAH! -- dpb) Rollup for .NET Framework...(KB4499406) Published 5/14/201...

9 days ago | 0

Question

Windows .NET Framework Update Breaks READTABLE()

Not so much a Q? as a report... Got up this AM to discover Windwoes had installed Office and OS update. After the interminable...

10 days ago | 2 answers | 0

Answered

How can I isolate the (x, y) from a (x, y, z) dataset?

Well, there are 142 100x190 arrays possible, which one(s) do you want? Just index... for i=1:size(XYX,3) % iterate ov...

How can I isolate the (x, y) from a (x, y, z) dataset?

Well, there are 142 100x190 arrays possible, which one(s) do you want? Just index... for i=1:size(XYX,3) % iterate ov...

11 days ago | 0

Answered

How do I break y-axis to improve visualisation when plotting intervals as errorbars?

"P.S. If there is any other suggestion about how to plot intervals in matlab for good visualization I will appreciate it." For ...

How do I break y-axis to improve visualisation when plotting intervals as errorbars?

"P.S. If there is any other suggestion about how to plot intervals in matlab for good visualization I will appreciate it." For ...

11 days ago | 0

Answered

read multiple csv files and extract first 10 rows only

Just read each file in turn and save the first N lines... NLines=10; % how many wanted to save...make variable so ca...

read multiple csv files and extract first 10 rows only

Just read each file in turn and save the first N lines... NLines=10; % how many wanted to save...make variable so ca...

12 days ago | 0

Question

WRITETABLE to spreadhseet mysterious failure

>> writetable(tMismatch) >> type tMismatch.txt Fund,Acct,B_Student,SID,B_Paid,R_Student,R_Paid,R_Award,MatchStatus,R_Formula...

12 days ago | 1 answer | 0

Answered

Sorting same rows & columns in two different matrices?

Piece o' cake with logical indexing... C=B(isnan(A)); % just return the values ix=isnan(A); % return the pattern i...

Sorting same rows & columns in two different matrices?

Piece o' cake with logical indexing... C=B(isnan(A)); % just return the values ix=isnan(A); % return the pattern i...

12 days ago | 0

Answered

fplot doesnt give the same result of plot

So, why not just use plot if that's what you want? But, read the doc for fplot -- all is explained: Description ... fplot(f)...

fplot doesnt give the same result of plot

So, why not just use plot if that's what you want? But, read the doc for fplot -- all is explained: Description ... fplot(f)...

12 days ago | 0

Answered

Replace elements in array with smaller array

Just read into a dummy variable and store only the N samples wanted. Nothing fancy needed at all. % names of the files: % MIC...

Replace elements in array with smaller array

Just read into a dummy variable and store only the N samples wanted. Nothing fancy needed at all. % names of the files: % MIC...

13 days ago | 1

| accepted

Answered

How can I get the number between 2 numbers?

ix=cell2mat(arrayfun(@(n)find(PA==n),n,'uni',0).'); PA=arrayfun(@(i1,i2)PA(i1+1:i2-1),ix(:,1),ix(:,2),'uni',0); PB should be o...

How can I get the number between 2 numbers?

ix=cell2mat(arrayfun(@(n)find(PA==n),n,'uni',0).'); PA=arrayfun(@(i1,i2)PA(i1+1:i2-1),ix(:,1),ix(:,2),'uni',0); PB should be o...

13 days ago | 0

| accepted

Answered

How to choose sampling frequency to generate signals?

Minimum sampling frequency would be >= Nyquist frequency which is max([f0 f1 f2 ... fn])/2 Sampling at 3-4X that value will be ...

How to choose sampling frequency to generate signals?

Minimum sampling frequency would be >= Nyquist frequency which is max([f0 f1 f2 ... fn])/2 Sampling at 3-4X that value will be ...

13 days ago | 0

Answered

excel table data analysis

It's not trivial to learn the tricks, granted...but here's a start for the first...with it and some study of the examples, shoul...

excel table data analysis

It's not trivial to learn the tricks, granted...but here's a start for the first...with it and some study of the examples, shoul...

15 days ago | 2

| accepted

Answered

Excel Vs Matlab Curve Fitting Tool

Read the output from Matlab -- the model has been standardized whereas the Excel model uses raw data. Note the R-sq and adjuste...

Excel Vs Matlab Curve Fitting Tool

Read the output from Matlab -- the model has been standardized whereas the Excel model uses raw data. Note the R-sq and adjuste...

18 days ago | 2

| accepted

Answered

How can I filter through my data using a for loop?

filename = 'PIVtest.xlsx'; data=xlsread(filename); PLimit = 100; % set position limit to screen TPV=data(d...

How can I filter through my data using a for loop?

filename = 'PIVtest.xlsx'; data=xlsread(filename); PLimit = 100; % set position limit to screen TPV=data(d...

19 days ago | 0

| accepted

Answered

Error Bars on horizontal bar chart

"errorbar(x,y,neg,pos) draws a vertical error bar at each data point, where neg determines the length below the data point and p...

Error Bars on horizontal bar chart

"errorbar(x,y,neg,pos) draws a vertical error bar at each data point, where neg determines the length below the data point and p...

19 days ago | 1

| accepted

Answered

How to plot different length of vectors?

for k=1:3000 xvalue1(k)=k; end MATLAB is MATrix LABoratory -- use vector facilities... xvalue1=1:3000; figure; d5=X_...

How to plot different length of vectors?

for k=1:3000 xvalue1(k)=k; end MATLAB is MATrix LABoratory -- use vector facilities... xvalue1=1:3000; figure; d5=X_...

19 days ago | 0

Answered

Why is str2num returning [] and str2double returning NaN?

X = str2double('newStr1') Y = str2doule('newStr2') You're trying to turn the literal character arrays 'newStr1' and 'newStr2' ...

Why is str2num returning [] and str2double returning NaN?

X = str2double('newStr1') Y = str2doule('newStr2') You're trying to turn the literal character arrays 'newStr1' and 'newStr2' ...

19 days ago | 1

| accepted

Answered

Help with Global Variables

But you define and set D=0 in the function as a local variable inside the function modeleth so nothing outside prior to that mat...

Help with Global Variables

But you define and set D=0 in the function as a local variable inside the function modeleth so nothing outside prior to that mat...

20 days ago | 0

Answered

How I can substract vectors with different length?

I presume you mean to standardize the monthly data by year...presuming you have a date variable along with the observation, then...

How I can substract vectors with different length?

I presume you mean to standardize the monthly data by year...presuming you have a date variable along with the observation, then...

20 days ago | 0

| accepted

Answered

Access to array of structs (no for loops)

Is expressly noted that ML does NOT support array indexing for more than a single struct array element expression--see Note @ ht...

Access to array of structs (no for loops)

Is expressly noted that ML does NOT support array indexing for more than a single struct array element expression--see Note @ ht...

20 days ago | 0

Answered

Whiskers in Boxplot seems incorrect

Read the description of 'whisker' carefully...particularly the very last sentence below (emphasis mine): "boxplot draws points ...

Whiskers in Boxplot seems incorrect

Read the description of 'whisker' carefully...particularly the very last sentence below (emphasis mine): "boxplot draws points ...

21 days ago | 0

| accepted