Answered

How can I find mean crossing irregularity?

z=randn(1,1000); % sample dataset zs=detrend(z>0); % convert to binary at origin iz=diff(find([0 zs])); % cross...

How can I find mean crossing irregularity?

z=randn(1,1000); % sample dataset zs=detrend(z>0); % convert to binary at origin iz=diff(find([0 zs])); % cross...

alrededor de 16 horas ago | 0

Answered

Assign same linewidth to a grouped barplot

You can't use the "dot" notation with an array of handles, anyway; must use set here, or a looping construct of some sort. se...

Assign same linewidth to a grouped barplot

You can't use the "dot" notation with an array of handles, anyway; must use set here, or a looping construct of some sort. se...

5 días ago | 1

Answered

How to compare two columns in a table and delete that row having same values in that columns?

c=string({'column1' 'column 2' 'columns3' 'ball' 'bat' 'gloves' 'bat' 'gloves' 'bat' 'ball' ...

How to compare two columns in a table and delete that row having same values in that columns?

c=string({'column1' 'column 2' 'columns3' 'ball' 'bat' 'gloves' 'bat' 'gloves' 'bat' 'ball' ...

7 días ago | 0

Answered

Error using corrplot function

OK, I played with one of the sample datasets used for illustrating some other regression stuff...it is possible to start with pl...

Error using corrplot function

OK, I played with one of the sample datasets used for illustrating some other regression stuff...it is possible to start with pl...

7 días ago | 0

Answered

Binomial Distribution when mean and variance is given

Well, sometimes one is given a nonsensical problem -- if so, then one has to inform the requestor of the fact and get a differen...

Binomial Distribution when mean and variance is given

Well, sometimes one is given a nonsensical problem -- if so, then one has to inform the requestor of the fact and get a differen...

8 días ago | 0

| accepted

Answered

2 digits after the dot

In the first case, you'll have to use >> string(arrayfun(@(n)sprintf('%.2f',n),vals,'UniformOutput',false)) ans = 2×3 str...

2 digits after the dot

In the first case, you'll have to use >> string(arrayfun(@(n)sprintf('%.2f',n),vals,'UniformOutput',false)) ans = 2×3 str...

8 días ago | 0

| accepted

Answered

Generating a heat map of adjacency matrix

Presuming you want the displayed values of the cells to still be their totals, then s = [1 1 1 2 2 3]; t = [2 3 4 5 6 7]; G =...

Generating a heat map of adjacency matrix

Presuming you want the displayed values of the cells to still be their totals, then s = [1 1 1 2 2 3]; t = [2 3 4 5 6 7]; G =...

8 días ago | 0

| accepted

Answered

Check for missing argument or incorrect argument data type in call to function 'predict'.

I've never used fitrlinear (didn't know it existed, in fact), but it appears that it returns a composite object and that the req...

Check for missing argument or incorrect argument data type in call to function 'predict'.

I've never used fitrlinear (didn't know it existed, in fact), but it appears that it returns a composite object and that the req...

8 días ago | 1

| accepted

Answered

How to change values to 3 decimal points and 7 significant figures?

You can't set an arbitrary format string or precision for command window output; only the few selectable choices given by the fo...

How to change values to 3 decimal points and 7 significant figures?

You can't set an arbitrary format string or precision for command window output; only the few selectable choices given by the fo...

8 días ago | 3

| accepted

Answered

Search for minimal value in column of table when value in other columns are the same

function [f,ix]=fastest(d,r) % return minimum of input time of travel array, d and % corresponding row index of minimum from ...

Search for minimal value in column of table when value in other columns are the same

function [f,ix]=fastest(d,r) % return minimum of input time of travel array, d and % corresponding row index of minimum from ...

8 días ago | 0

| accepted

Answered

histogram style graph with several different data types with each type coloured differently

Actually, it's not too bad to just make up something...not sure where and why you ran into difficulties without seeing what sort...

histogram style graph with several different data types with each type coloured differently

Actually, it's not too bad to just make up something...not sure where and why you ran into difficulties without seeing what sort...

9 días ago | 0

| accepted

Answered

how to read a data from text file

zein=readlines('yourfilename.txt'); xyz=str2double(split(extractBetween(zein(3:end-1),'(',')')," "));

how to read a data from text file

zein=readlines('yourfilename.txt'); xyz=str2double(split(extractBetween(zein(3:end-1),'(',')')," "));

9 días ago | 0

| accepted

Answered

How can I order a matrix in a specific order?

I've no klew what amplapi is, but if you have a text file like the first, reading it into MATLAB will not reorder it. >> which ...

How can I order a matrix in a specific order?

I've no klew what amplapi is, but if you have a text file like the first, reading it into MATLAB will not reorder it. >> which ...

10 días ago | 0

| accepted

Answered

X must have length equal to the number of rows in Y, but I'm pretty sure they're the same size

nutrients14 is a table in which case those will be column vectors instead of row vectors and stackedplot needs one X and an arra...

X must have length equal to the number of rows in Y, but I'm pretty sure they're the same size

nutrients14 is a table in which case those will be column vectors instead of row vectors and stackedplot needs one X and an arra...

11 días ago | 1

| accepted

Answered

Combine rows and average contents in table

% smoosh edges of disjoint regions to midpoints between... edges=[0.085 0.125; 0.17 0.23; 0.27 0.45; 0.6 0.9]; e=edges.'; e=e(...

Combine rows and average contents in table

% smoosh edges of disjoint regions to midpoints between... edges=[0.085 0.125; 0.17 0.23; 0.27 0.45; 0.6 0.9]; e=edges.'; e=e(...

12 días ago | 0

| accepted

Answered

Extracting single lines of text from a .txt file

In general, unless the file(s) are very large, it's more efficient to just read the whole file and then locate the wanted data i...

Extracting single lines of text from a .txt file

In general, unless the file(s) are very large, it's more efficient to just read the whole file and then locate the wanted data i...

12 días ago | 0

Answered

compare two columns and their corresponding values from two different excel files

>> data1=readtable('data.xlsx');data2=readtable('Data2.xlsx'); >> setdiff(data1,data2,'rows') ans = 3×2 table count...

compare two columns and their corresponding values from two different excel files

>> data1=readtable('data.xlsx');data2=readtable('Data2.xlsx'); >> setdiff(data1,data2,'rows') ans = 3×2 table count...

13 días ago | 0

| accepted

Answered

Why does dir command find files not following pattern in Windows?

That's the behavior of the OS dir command under Windows; '*' matches anything including nothing. Unfortunately, in typical MS s...

Why does dir command find files not following pattern in Windows?

That's the behavior of the OS dir command under Windows; '*' matches anything including nothing. Unfortunately, in typical MS s...

13 días ago | 0

| accepted

Answered

Graph plot with given range

You didn't allocate for each element of the output arrays but computed each point one-at-a-time by using an unneeded for...end l...

Graph plot with given range

You didn't allocate for each element of the output arrays but computed each point one-at-a-time by using an unneeded for...end l...

13 días ago | 0

| accepted

Answered

combine 2 plot with different length

plot(x1,y1) hold on plot(x2,y2) or plot(x1,y1,x2,y2)

combine 2 plot with different length

plot(x1,y1) hold on plot(x2,y2) or plot(x1,y1,x2,y2)

14 días ago | 0

| accepted

Answered

Split a vector where NaN appears

>> x=randn(10,1);x([4 7])=nan x = 0.5080 0.2820 0.0335 NaN 1.1275 0.3502 NaN 0.02...

Split a vector where NaN appears

>> x=randn(10,1);x([4 7])=nan x = 0.5080 0.2820 0.0335 NaN 1.1275 0.3502 NaN 0.02...

14 días ago | 0

| accepted

Answered

How to make a script so I can choose a file from folders

While it's only documented by a very terse example, the builtin dir function will recurse directories if the search pattern cont...

How to make a script so I can choose a file from folders

While it's only documented by a very terse example, the builtin dir function will recurse directories if the search pattern cont...

15 días ago | 0

Answered

Get a subset of columns from a timeseries object as a timeseries

plot(u.Time,u.Data(:,1)) "But isn't there a simpler way similar to how I would plot a timeseries with only one variable?" Once...

Get a subset of columns from a timeseries object as a timeseries

plot(u.Time,u.Data(:,1)) "But isn't there a simpler way similar to how I would plot a timeseries with only one variable?" Once...

15 días ago | 1

| accepted

Answered

how to split a table to multiple table?

>> CT=reshape(CT,4,4,[]) CT(:,:,1) = 196 296 305 305 317 291 234 196 246 229 313 313 333 17...

how to split a table to multiple table?

>> CT=reshape(CT,4,4,[]) CT(:,:,1) = 196 296 305 305 317 291 234 196 246 229 313 313 333 17...

17 días ago | 1

| accepted

Answered

extraction of numeric data with presence of text data

fid=fopen('abc.txt','r'); abc=textscan(fid,'%s',inf,'Delimiter','\n','HeaderLines',2,'commentstyle','1','texttype','string'); ...

extraction of numeric data with presence of text data

fid=fopen('abc.txt','r'); abc=textscan(fid,'%s',inf,'Delimiter','\n','HeaderLines',2,'commentstyle','1','texttype','string'); ...

17 días ago | 0

| accepted

Answered

How to read .txt separate by - and in dms format

>> fmt='%f-%f-%fN %f-%f-%fW %f'; >> data=cell2mat(textscan(fid,fmt,'CollectOutput',1,'HeaderLines',1)) data = 46.00 ...

How to read .txt separate by - and in dms format

>> fmt='%f-%f-%fN %f-%f-%fW %f'; >> data=cell2mat(textscan(fid,fmt,'CollectOutput',1,'HeaderLines',1)) data = 46.00 ...

17 días ago | 1

| accepted

Answered

using findstr to find what you are looking for

Looks like hard way to go at it to me...I'd just download the data to local file and snarf it up ... eopdata = urlread('https:/...

using findstr to find what you are looking for

Looks like hard way to go at it to me...I'd just download the data to local file and snarf it up ... eopdata = urlread('https:/...

17 días ago | 0

| accepted

Answered

I get date info when plot a Datetime in x-axis.

Another case of TMW being too aggressive in hiding things from the end user inside graphics objects -- the year/date 'SecondaryL...

I get date info when plot a Datetime in x-axis.

Another case of TMW being too aggressive in hiding things from the end user inside graphics objects -- the year/date 'SecondaryL...

17 días ago | 0

| accepted

Answered

Extract a Column from a large csv file

data=readmatrix('forward_turn_and_back.csv','range','AD:AD','NumHeaderLines',N); You'll have to set N for the number of headerl...

Extract a Column from a large csv file

data=readmatrix('forward_turn_and_back.csv','range','AD:AD','NumHeaderLines',N); You'll have to set N for the number of headerl...

20 días ago | 0

Answered

how to increase the decimal place and it must be side to side as below

fmt=['%0.4f%+0.4fi\t%0.4f%+0.4fi\n']; >> for i=1:size(approx,2) fprintf(fmt,real(approx(i)),imag(approx(i)),real(exact(...

how to increase the decimal place and it must be side to side as below

fmt=['%0.4f%+0.4fi\t%0.4f%+0.4fi\n']; >> for i=1:size(approx,2) fprintf(fmt,real(approx(i)),imag(approx(i)),real(exact(...

21 días ago | 0