Answered

How to arrange month columns based on date code is run?

vnames=month(datetime(1,[1:12],1),'short'); % return dummy variable names containing short month names % engine >> circsh...

How to arrange month columns based on date code is run?

vnames=month(datetime(1,[1:12],1),'short'); % return dummy variable names containing short month names % engine >> circsh...

2 días ago | 0

| accepted

Answered

Function overwrites output with a different number

Besides the refactoring and code mlint suggestions removal, I think the biggest problem is the function definition line functio...

Function overwrites output with a different number

Besides the refactoring and code mlint suggestions removal, I think the biggest problem is the function definition line functio...

6 días ago | 0

| accepted

Answered

How to decipher date formats?

"Is it possible to get their [variant input and ambiguous formats - sic] datenum correctly in a holistical way?" "Possible?" M...

How to decipher date formats?

"Is it possible to get their [variant input and ambiguous formats - sic] datenum correctly in a holistical way?" "Possible?" M...

6 días ago | 0

| accepted

Answered

Errorbar Plot with Line of best fit

S-S is correct that per the documentation lsline only works for scatter plots or not connected lines with plot Perhaps just a l...

Errorbar Plot with Line of best fit

S-S is correct that per the documentation lsline only works for scatter plots or not connected lines with plot Perhaps just a l...

7 días ago | 0

Answered

How to remove dates in graph ?

The error ax.XAxis.TickValues=1:10:length(NewP{:,"Date"}) Error using matlab.graphics.axis.decorator.DatetimeRuler/validateTic...

How to remove dates in graph ?

The error ax.XAxis.TickValues=1:10:length(NewP{:,"Date"}) Error using matlab.graphics.axis.decorator.DatetimeRuler/validateTic...

8 días ago | 0

Answered

How to find a particular value from 3-d matrix?

If you're certain the value 1.75 exactly exists in the file and that's all you want exactly (to machine precision) then simply ...

How to find a particular value from 3-d matrix?

If you're certain the value 1.75 exactly exists in the file and that's all you want exactly (to machine precision) then simply ...

10 días ago | 1

Answered

how to read and create column vectors from this txt file (attached)?

A fixedWidthImportOptions object can help here altho the heading row doesn't quite line up to make it as trivial as could otherw...

how to read and create column vectors from this txt file (attached)?

A fixedWidthImportOptions object can help here altho the heading row doesn't quite line up to make it as trivial as could otherw...

10 días ago | 0

| accepted

Answered

Bar graph for two different arrays

Didn't read doc bar did you? It'll take 1:5 on the x-axis but bar([a;b].')

Bar graph for two different arrays

Didn't read doc bar did you? It'll take 1:5 on the x-axis but bar([a;b].')

10 días ago | 0

| accepted

Answered

Removing NaN in Linear Regression Problem. Error in line 66.

You don't pass the table to regress but the variables to be used in the regression -- then you won't run into the issue inside r...

Removing NaN in Linear Regression Problem. Error in line 66.

You don't pass the table to regress but the variables to be used in the regression -- then you won't run into the issue inside r...

10 días ago | 0

| accepted

Answered

Reordering string arrays if string is >9

<ileexchange/10959-sort_nat-natural-order-sort>

Reordering string arrays if string is >9

<ileexchange/10959-sort_nat-natural-order-sort>

10 días ago | 1

Answered

read coordinate from a txt file

textscan is overkill for a simple csv file of the above form -- controlpoints=importdata('YOURTEXTFILE.CSV'); and you'll have ...

read coordinate from a txt file

textscan is overkill for a simple csv file of the above form -- controlpoints=importdata('YOURTEXTFILE.CSV'); and you'll have ...

10 días ago | 1

| accepted

Answered

Convert cell array to double, with comma separated elements

>> v=cell2mat(cellfun(@(s) sscanf(s,'%f,').',c,'UniformOutput',false)) v = 126.5000 250.5000 22.0000 27.0000 127.500...

Convert cell array to double, with comma separated elements

>> v=cell2mat(cellfun(@(s) sscanf(s,'%f,').',c,'UniformOutput',false)) v = 126.5000 250.5000 22.0000 27.0000 127.500...

10 días ago | 1

Answered

Trouble adding error bars to bar graph

<Answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center> <Answers/359237-how-do-i-label-each-bar-in-bar-group-with-...

Trouble adding error bars to bar graph

<Answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center> <Answers/359237-how-do-i-label-each-bar-in-bar-group-with-...

11 días ago | 0

| accepted

Answered

Create a maxtrix of row x columns and add values (column-wise) in a loop

Comment moved to Answer since did seem to be the Q? asked... j=0; % initialize other array counter ...

Create a maxtrix of row x columns and add values (column-wise) in a loop

Comment moved to Answer since did seem to be the Q? asked... j=0; % initialize other array counter ...

11 días ago | 1

Answered

Use all table/timetable variables as input arguments of function without writing each variable manually.

As a start altho need more to know precisely what else to do, look at\ >> rowfun(@corrug_parameters,B3_B4,'InputVariables',{'di...

Use all table/timetable variables as input arguments of function without writing each variable manually.

As a start altho need more to know precisely what else to do, look at\ >> rowfun(@corrug_parameters,B3_B4,'InputVariables',{'di...

12 días ago | 0

| accepted

Answered

Output from while-loop at fixed values

Either compute the number of timesteps corresponding to your dt and desired frequency if dt is constant and output every N times...

Output from while-loop at fixed values

Either compute the number of timesteps corresponding to your dt and desired frequency if dt is constant and output every N times...

12 días ago | 0

| accepted

Answered

Write matrix to a Tab-Delimited text file

If are only numeric values in those three columns, then why not use the numeric return values from n instead? Depending on the ...

Write matrix to a Tab-Delimited text file

If are only numeric values in those three columns, then why not use the numeric return values from n instead? Depending on the ...

13 días ago | 1

Answered

Matlab Simplifies Function To 0

That doesn't define a function in MATLAB syntax; it assigns the evaluation of the RHS of the assignment statement to a 3D array ...

Matlab Simplifies Function To 0

That doesn't define a function in MATLAB syntax; it assigns the evaluation of the RHS of the assignment statement to a 3D array ...

13 días ago | 1

Answered

How to change x and y labels limts

"When I put duration i got error. When I use xtick, the label didnt; fit to reality. " Must not have tried very hard or read t...

How to change x and y labels limts

"When I put duration i got error. When I use xtick, the label didnt; fit to reality. " Must not have tried very hard or read t...

13 días ago | 1

Answered

about a ChemName function

You just pass the struct as the argument to the function and return the same struct; there's nothing required in MATLAB to defin...

about a ChemName function

You just pass the struct as the argument to the function and return the same struct; there's nothing required in MATLAB to defin...

13 días ago | 0

Answered

Center of repeatative/duplicate values in Matlab

val=unique(A); iC=arrayfun(@(x) median(find(A==x)),val); for your A above >> val=unique(A); >> iC=arrayfun(@(x) median(find(...

Center of repeatative/duplicate values in Matlab

val=unique(A); iC=arrayfun(@(x) median(find(A==x)),val); for your A above >> val=unique(A); >> iC=arrayfun(@(x) median(find(...

14 días ago | 0

Answered

How to delete rows from a TimeSeries variable

delsample timeseries are different...only can address by the time values or events, not linear indexing. I've never found them...

How to delete rows from a TimeSeries variable

delsample timeseries are different...only can address by the time values or events, not linear indexing. I've never found them...

14 días ago | 0

| accepted

Answered

How to take common data from two matrix with different dimensions

unzip ACCESS1.0.zip fd='ACCESS1.0'; A=xlsread(fullfile(fd,'ACCESS1.xlsx')); E=xlsread(fullfile(fd,'ERA5_1985_2005.xlsx')); d...

How to take common data from two matrix with different dimensions

unzip ACCESS1.0.zip fd='ACCESS1.0'; A=xlsread(fullfile(fd,'ACCESS1.xlsx')); E=xlsread(fullfile(fd,'ERA5_1985_2005.xlsx')); d...

14 días ago | 0

| accepted

Answered

Why are empty square brackets used in this fsolve function?

It's an undocumented trap door that allows other parameters to be passed to the objective function; the [] placeholder bypasses ...

Why are empty square brackets used in this fsolve function?

It's an undocumented trap door that allows other parameters to be passed to the objective function; the [] placeholder bypasses ...

15 días ago | 4

| accepted

Answered

How to convert a column in matrix from string to numeric

data = readtable(['data' cell2mat(indexVars(i))], 'Format','%s%f%{yyyyMMddhhmm}D%f%f%f'); 'hh' is for 12-hr day; 'HH' is for 24...

How to convert a column in matrix from string to numeric

data = readtable(['data' cell2mat(indexVars(i))], 'Format','%s%f%{yyyyMMddhhmm}D%f%f%f'); 'hh' is for 12-hr day; 'HH' is for 24...

15 días ago | 0

| accepted

Answered

Intersection of a line with constant slope and a line with changing slopes

idx = 2980; % calls upon river profile #2980 out of 10848 channel_height=0:20; channel_length=...

Intersection of a line with constant slope and a line with changing slopes

idx = 2980; % calls upon river profile #2980 out of 10848 channel_height=0:20; channel_length=...

15 días ago | 0

| accepted

Answered

How to convert time (duration) to datetime?

The datetime class cannot exist without both a date and a time component. You'll have to assign a date as well... du=duration(...

How to convert time (duration) to datetime?

The datetime class cannot exist without both a date and a time component. You'll have to assign a date as well... du=duration(...

16 días ago | 0

Answered

Is it possible to assign new values which are integers to categorical array?

See the above comment, but if there is some reason you really, really need/want the numbers instead on the axes, then hAx=gca; ...

Is it possible to assign new values which are integers to categorical array?

See the above comment, but if there is some reason you really, really need/want the numbers instead on the axes, then hAx=gca; ...

16 días ago | 0

Answered

I have to compare data from matrix with different dimensions

Convert both to timetable or timeseries objects and use retime to synchronize the two.

I have to compare data from matrix with different dimensions

Convert both to timetable or timeseries objects and use retime to synchronize the two.

16 días ago | 0

Answered

Pahse Shift as a Function of Height

Well, if you already have a phase shift, that's something else entirely...carrying on from above phasedata=importdata('Schmidt...

Pahse Shift as a Function of Height

Well, if you already have a phase shift, that's something else entirely...carrying on from above phasedata=importdata('Schmidt...

18 días ago | 0

| accepted