回答済み

Matlab replaces missing doubles by zeros instead of NaNs

The "WHY" goes back to original design of MATLAB and was the chosen behavior when first invented. To change that behavior now w...

Matlab replaces missing doubles by zeros instead of NaNs

The "WHY" goes back to original design of MATLAB and was the chosen behavior when first invented. To change that behavior now w...

7日 前 | 0

回答済み

Plot multiple variables with stackedplot with data for the x-axis?

From the doc, about the third input syntax description is stackedplot(___,'XVariable',xvar)

Plot multiple variables with stackedplot with data for the x-axis?

From the doc, about the third input syntax description is stackedplot(___,'XVariable',xvar)

7日 前 | 0

回答済み

How to find the frequencies of a time series which contain datetime ?

I think it's absurd to even think about peforming spectral analysis on such a intermittently-sampled signal, but the only thing ...

How to find the frequencies of a time series which contain datetime ?

I think it's absurd to even think about peforming spectral analysis on such a intermittently-sampled signal, but the only thing ...

8日 前 | 0

回答済み

how to plot hexagon inside boundary?

As a starting point... N=6; t=2*pi*(1/(2*N):1/N:1).'; x=cos(t);y=sin(t); fill(x,y,'k') axis square hold on hH=fill(x+2*ma...

how to plot hexagon inside boundary?

As a starting point... N=6; t=2*pi*(1/(2*N):1/N:1).'; x=cos(t);y=sin(t); fill(x,y,'k') axis square hold on hH=fill(x+2*ma...

9日 前 | 1

| 採用済み

回答済み

Excel Spreadsheet Autofill Range (Multiple rows) via MATLAB command

Start by creating a macro that does what you want done and look at in in VBA -- I usually just paste it into the MATLAB editor a...

Excel Spreadsheet Autofill Range (Multiple rows) via MATLAB command

Start by creating a macro that does what you want done and look at in in VBA -- I usually just paste it into the MATLAB editor a...

9日 前 | 0

| 採用済み

回答済み

Hello everyone, I want to restrict the domain of a vector to return it to a smaller data set. For example, X between 2 and 7

Perfect use for my utility function iswithin >> x=1:10; >> x=x(iswithin(x,2,7)) x = 2 3 4 5 6 7 >>...

Hello everyone, I want to restrict the domain of a vector to return it to a smaller data set. For example, X between 2 and 7

Perfect use for my utility function iswithin >> x=1:10; >> x=x(iswithin(x,2,7)) x = 2 3 4 5 6 7 >>...

9日 前 | 0

| 採用済み

回答済み

How to change the font size of xtick and ytick with scientific notation on the side?

x=linspace(0,2.1E-4); y=randn(size(x)); >> plot(x,y) >> hAx=gca; >> hAx.FontName='Times New Roman'; >> hAx.FontSize=12; >> ...

How to change the font size of xtick and ytick with scientific notation on the side?

x=linspace(0,2.1E-4); y=randn(size(x)); >> plot(x,y) >> hAx=gca; >> hAx.FontName='Times New Roman'; >> hAx.FontSize=12; >> ...

9日 前 | 0

| 採用済み

回答済み

Plot with x-axis label in Hour instead of Second

tT=readtable("Q.csv"); tT=addvars(tT,seconds(1:height(tT)).','before','Temp','NewVariableNames','T'); tT.T.Format='h'; plot(t...

Plot with x-axis label in Hour instead of Second

tT=readtable("Q.csv"); tT=addvars(tT,seconds(1:height(tT)).','before','Temp','NewVariableNames','T'); tT.T.Format='h'; plot(t...

9日 前 | 0

| 採用済み

回答済み

I want to create a bar3 plot for the contribution of two parameters as like in figure

OK...had a few minutes -- try Z=B(3:end,3:end); % save the data portion of the overall arrray; MATLAB will, I think) just...

I want to create a bar3 plot for the contribution of two parameters as like in figure

OK...had a few minutes -- try Z=B(3:end,3:end); % save the data portion of the overall arrray; MATLAB will, I think) just...

9日 前 | 0

回答済み

Find country code from city name

Postal codes helps for many countries, yes...although there are some that either don't have or don't use one, if all your addres...

Find country code from city name

Postal codes helps for many countries, yes...although there are some that either don't have or don't use one, if all your addres...

9日 前 | 0

回答済み

index exceed the number of arrays elements

length_collective=length(Collective); %equals to 124 length_single=length(single); %equals to 393 for i=1:1:length(Collective)...

index exceed the number of arrays elements

length_collective=length(Collective); %equals to 124 length_single=length(single); %equals to 393 for i=1:1:length(Collective)...

9日 前 | 1

回答済み

Why does num2str() of 138.97 return 138.96999999999999886?

Wrong expectation for floating point numbers -- short story is if a fraction is not exactly representable by 1/2^n, it'll not be...

Why does num2str() of 138.97 return 138.96999999999999886?

Wrong expectation for floating point numbers -- short story is if a fraction is not exactly representable by 1/2^n, it'll not be...

10日 前 | 0

回答済み

Merge 864 single column text files and 60,000 rows in single file. How to get a matrix with 60000 rows and 864 column

It would be simpler if you had named the files so they would sort lexically as C001, C002, ... etc., but it's still not too bad....

Merge 864 single column text files and 60,000 rows in single file. How to get a matrix with 60000 rows and 864 column

It would be simpler if you had named the files so they would sort lexically as C001, C002, ... etc., but it's still not too bad....

10日 前 | 0

| 採用済み

回答済み

A compact way to find single digit numbers (i.e. numbers between 0 and 9) and replace them with two digit numbers

For what purpose and in what context? You will only be able to show the leading zeros if you convert the numeric values to some...

A compact way to find single digit numbers (i.e. numbers between 0 and 9) and replace them with two digit numbers

For what purpose and in what context? You will only be able to show the leading zeros if you convert the numeric values to some...

10日 前 | 0

回答済み

Legend command not working when plotting figure

Try something like figure pbaspect([1 1 1]) loglog(ElectronEnergy(:), [ElectronDifFlue(:) ElectronSolMinDifFlue(:)], 'LineWid...

Legend command not working when plotting figure

Try something like figure pbaspect([1 1 1]) loglog(ElectronEnergy(:), [ElectronDifFlue(:) ElectronSolMinDifFlue(:)], 'LineWid...

10日 前 | 0

回答済み

Delete selected worksheet from Excel

OK, I'll create new Answer to move out of the previous longish comments and to reflect what I now (think) I know that I wasn't f...

Delete selected worksheet from Excel

OK, I'll create new Answer to move out of the previous longish comments and to reflect what I now (think) I know that I wasn't f...

11日 前 | 0

回答済み

Winopen does not work on executable

I've packaged it (winopen) in another app and it works fine. Looking at the above code snippet, I'd hypothesize your problem is...

Winopen does not work on executable

I've packaged it (winopen) in another app and it works fine. Looking at the above code snippet, I'd hypothesize your problem is...

11日 前 | 0

回答済み

How to have top x axis with different scale as compared to bottom x axis for same plot?

Try fhe FEX submission <plotxx-m FEX> -- I've not used it, but looks like it does nice job...

How to have top x axis with different scale as compared to bottom x axis for same plot?

Try fhe FEX submission <plotxx-m FEX> -- I've not used it, but looks like it does nice job...

11日 前 | 0

回答済み

Fast fourier tranformer for Time series data

No disagreements at all with what @Bjorn Gustavsson notes, just do a baseband PSD and look at the signal some... First, look at...

Fast fourier tranformer for Time series data

No disagreements at all with what @Bjorn Gustavsson notes, just do a baseband PSD and look at the signal some... First, look at...

11日 前 | 1

回答済み

Delete selected worksheet from Excel

excelName1= fullfile(newPath,excelFile); %file name and address, worksheet to be deleted from this Excel. Excel = actxser...

Delete selected worksheet from Excel

excelName1= fullfile(newPath,excelFile); %file name and address, worksheet to be deleted from this Excel. Excel = actxser...

12日 前 | 0

回答済み

How to create a textbox using annotation, that includes matlab shapes?

While apparently theoretically possible to mung on the vertices of an annotation object to change the shape -- figure hF=gcf; ...

How to create a textbox using annotation, that includes matlab shapes?

While apparently theoretically possible to mung on the vertices of an annotation object to change the shape -- figure hF=gcf; ...

12日 前 | 1

| 採用済み

回答済み

Delete selected worksheet from Excel

You don't seem to be following the path I laid out but reinventing the wheel and changing coding styles... The thread <Excel Ut...

Delete selected worksheet from Excel

You don't seem to be following the path I laid out but reinventing the wheel and changing coding styles... The thread <Excel Ut...

12日 前 | 0

回答済み

R-squared analysis of scatter plot resulting in NaN

'Pends on how you did it -- show your code for exact answer to that direction, but -- If you have the Statistics TB, then use ...

R-squared analysis of scatter plot resulting in NaN

'Pends on how you did it -- show your code for exact answer to that direction, but -- If you have the Statistics TB, then use ...

12日 前 | 0

回答済み

merge six columns with zeros step by step end of each one

It would be far easier to write code if you would use cell array for the existing data instead of a bunch of named variables -- ...

merge six columns with zeros step by step end of each one

It would be far easier to write code if you would use cell array for the existing data instead of a bunch of named variables -- ...

12日 前 | 0

回答済み

How do I run the function for each value in array?

clear global Tth1 Tth2 A B data= ... Therein lies your problem -- you wrote a script instead of a function -- get rid of th...

How do I run the function for each value in array?

clear global Tth1 Tth2 A B data= ... Therein lies your problem -- you wrote a script instead of a function -- get rid of th...

13日 前 | 0

| 採用済み

回答済み

how to copy sheet from one excel to another sheet of excel.

OK, here's a barebones routine that works to duplicate the given sheet, placing it after the copied one and names it to the requ...

how to copy sheet from one excel to another sheet of excel.

OK, here's a barebones routine that works to duplicate the given sheet, placing it after the copied one and names it to the requ...

13日 前 | 0

| 採用済み

回答済み

How can I edit code so only bottom graph is displayed.

W/o the data and w/o knowing what didn't work, the simplest way to just get the second plot alone by itself would be to just dra...

How can I edit code so only bottom graph is displayed.

W/o the data and w/o knowing what didn't work, the simplest way to just get the second plot alone by itself would be to just dra...

13日 前 | 0

回答済み

How to Extract ROI on a signal with additional rows before and after threshold

It's gotten too convoluted -- yes, the original answer does, as noted in the last comment, only return the first/last -- your or...

How to Extract ROI on a signal with additional rows before and after threshold

It's gotten too convoluted -- yes, the original answer does, as noted in the last comment, only return the first/last -- your or...

13日 前 | 1

| 採用済み

回答済み

How to remove one single quote at the beginning of a string?

The MATLAB function to retrieve the extension and filename is fileparts and to rebuild a new one is fullfile But, in this case...

How to remove one single quote at the beginning of a string?

The MATLAB function to retrieve the extension and filename is fileparts and to rebuild a new one is fullfile But, in this case...

14日 前 | 0

回答済み

Multi Colors and Legend for each bar

Slightly different, using a colorbar is nice alternative; legend is somewhat problematical owing to design of bar in that it's o...

Multi Colors and Legend for each bar

Slightly different, using a colorbar is nice alternative; legend is somewhat problematical owing to design of bar in that it's o...

14日 前 | 0