12,120 total contributions since 2012

Hic sunt dracones!

PROFESSIONAL: Physician (M.D.): Diplomate of the American Board of Internal Medicine; M.Sc. Biomedical Engineering: Instrumentation, Signal Processing, Control, System Identification, Parameter Estimation

NON-PROFESSIONAL: Amateur Extra Class Amateur Radio Operator; Private Pilot, Airplane Single Engine Land, Instrument Rating Airplane; Gamer

NOTE: I do not respond to emails or personal messages, unless they are about my File Exchange contributions.

Answered

How to plot the cyclone symbol in a figure?

I am not aware of one, although I have not yet needed to use one. One option is to use the section sign (§) with a text objec...

How to plot the cyclone symbol in a figure?

I am not aware of one, although I have not yet needed to use one. One option is to use the section sign (§) with a text objec...

1 hour ago | 0

Answered

How to get time for 50%, 90% and 100% of a graph?

Only some of your records follow the model you describe. For those that do, this works (using the code you posted to get the ...

How to get time for 50%, 90% and 100% of a graph?

Only some of your records follow the model you describe. For those that do, this works (using the code you posted to get the ...

3 hours ago | 0

Answered

polar plot to create circular shape with varying radius

Plotting the sine function in a polar plot will produce one circle in the upper half of the polar axes. To get the sort of pl...

polar plot to create circular shape with varying radius

Plotting the sine function in a polar plot will produce one circle in the upper half of the polar axes. To get the sort of pl...

4 hours ago | 0

| accepted

Answered

How can I measure the average of a signal at specified time points?

Try this: t = ...; % Time Vector s = ...; ...

How can I measure the average of a signal at specified time points?

Try this: t = ...; % Time Vector s = ...; ...

6 hours ago | 0

| accepted

Answered

Changes matrix size matlab

Use the reshape function, specifically: Out = reshape(A, [], 2)' producing (for the vector you posted): Out = 0 0...

Changes matrix size matlab

Use the reshape function, specifically: Out = reshape(A, [], 2)' producing (for the vector you posted): Out = 0 0...

15 hours ago | 0

| accepted

Answered

set default font in all figures

See the documentation section on Default Property Values. Note that this is not the same for all MATLAB releases, and changed...

set default font in all figures

See the documentation section on Default Property Values. Note that this is not the same for all MATLAB releases, and changed...

16 hours ago | 0

Answered

Finding the nonzero element in a specific row

Select the row, then use find: A = [1 3 0; 2 0 4; 0 7 9] DesiredRow = 2 cix = find(A(DesiredRow,:) ~= 0) so: A = 1...

Finding the nonzero element in a specific row

Select the row, then use find: A = [1 3 0; 2 0 4; 0 7 9] DesiredRow = 2 cix = find(A(DesiredRow,:) ~= 0) so: A = 1...

23 hours ago | 0

Answered

Why does Matlab substitute a number in a formula instead of solving it?

The Symbolic Math Toolbox outputs its results as symbolic expressions, unless you ask it to do otherwise. (It assumes you want ...

Why does Matlab substitute a number in a formula instead of solving it?

The Symbolic Math Toolbox outputs its results as symbolic expressions, unless you ask it to do otherwise. (It assumes you want ...

24 hours ago | 0

| accepted

Answered

Improving Presentation of a Graph

If you want your plots to have a finer resolution with respect to ‘R’, define ‘Rv’ to have more points: Rv = linspace(1, 10, 1...

Improving Presentation of a Graph

If you want your plots to have a finer resolution with respect to ‘R’, define ‘Rv’ to have more points: Rv = linspace(1, 10, 1...

1 day ago | 0

Answered

Harmonic spectrum of the voltage data

Try this: D = dlmread('voltage_u.txt','\t', 4, 0); D = D(1:end-1,1:2); % First Two Co...

Harmonic spectrum of the voltage data

Try this: D = dlmread('voltage_u.txt','\t', 4, 0); D = D(1:end-1,1:2); % First Two Co...

1 day ago | 0

| accepted

Answered

What's the best way to solve an equation in this example?

Try this: myFZERO = @(F) fzero(F, 10); % Hard-Coded Initial Estimate a = @(x) x.^2-5; ...

What's the best way to solve an equation in this example?

Try this: myFZERO = @(F) fzero(F, 10); % Hard-Coded Initial Estimate a = @(x) x.^2-5; ...

1 day ago | 2

| accepted

Answered

Finding the volume of individual surfaces of a surf plot?

Unfortunately, you did not post your data, so I created some. You will have to adapt this to your data: [X,Y] = meshgrid(1:...

Finding the volume of individual surfaces of a surf plot?

Unfortunately, you did not post your data, so I created some. You will have to adapt this to your data: [X,Y] = meshgrid(1:...

1 day ago | 0

Answered

Is it possible to plot a plot() and area() on same axis

Use the hold function: B57 = rand(1, 100); % Create ‘B57’ y1 = B57; PlotAX1 = axes; ...

Is it possible to plot a plot() and area() on same axis

Use the hold function: B57 = rand(1, 100); % Create ‘B57’ y1 = B57; PlotAX1 = axes; ...

2 days ago | 0

| accepted

Answered

Checking whether one row of an array is equal to the rows in a separate array

I would be tempted to use the ismember function with the 'rows' option (or ismembertol with the 'ByRows' option).

Checking whether one row of an array is equal to the rows in a separate array

I would be tempted to use the ismember function with the 'rows' option (or ismembertol with the 'ByRows' option).

2 days ago | 3

| accepted

Answered

Issues executing while loop

When I ran the code you posted, the while loop becomes infinite if ‘min(DPnew)’ is negative. In that event, this expression: ...

Issues executing while loop

When I ran the code you posted, the while loop becomes infinite if ‘min(DPnew)’ is negative. In that event, this expression: ...

2 days ago | 0

| accepted

Answered

Output of the function conv2 is not the size I expected?

Reverse the order of the arguments (so that the smaller size matrix is first), then use the 'same' shape argument: C = conv2(B...

Output of the function conv2 is not the size I expected?

Reverse the order of the arguments (so that the smaller size matrix is first), then use the 'same' shape argument: C = conv2(B...

2 days ago | 0

| accepted

Answered

Calculate difference between two signals

I would compare them by noting that the amplitudes of the peaks vary with respect to the independent variable, similarly for bot...

Calculate difference between two signals

I would compare them by noting that the amplitudes of the peaks vary with respect to the independent variable, similarly for bot...

2 days ago | 0

Answered

Plot of dspesific rows and columns

Importing your file depends on what is in it (numeric only, numeric with text headers, or something else). If you have R2019a o...

Plot of dspesific rows and columns

Importing your file depends on what is in it (numeric only, numeric with text headers, or something else). If you have R2019a o...

2 days ago | 0

Answered

Using Two Model Functions With LSQCUREVFIT

‘Do I need to call one PredCurrFun and the other PredCurrFun2, and LSQCURVEFIT can use both?’ Yes, in separate calls and othe...

Using Two Model Functions With LSQCUREVFIT

‘Do I need to call one PredCurrFun and the other PredCurrFun2, and LSQCURVEFIT can use both?’ Yes, in separate calls and othe...

3 days ago | 0

Answered

dealing with negative indices error

There turned out to be three problelms with your code that I corrected here. The original one was due to your forgetting an o...

dealing with negative indices error

There turned out to be three problelms with your code that I corrected here. The original one was due to your forgetting an o...

3 days ago | 1

Answered

"Glitches" in transfer function

Precision could certainly be a problem, especiall considering the magnitudes of those numbers. (MATLAB retains full internal pr...

"Glitches" in transfer function

Precision could certainly be a problem, especiall considering the magnitudes of those numbers. (MATLAB retains full internal pr...

3 days ago | 0

| accepted

Answered

Delete data with some requirements

Try this: D = load('Xsample_data.txt'); X = D(:,1); Y = D(:,2); Zx = D(:,3); Zy = D(:,4); Lvx = (Zx < -2.5) & (Zx > 2...

Delete data with some requirements

Try this: D = load('Xsample_data.txt'); X = D(:,1); Y = D(:,2); Zx = D(:,3); Zy = D(:,4); Lvx = (Zx < -2.5) & (Zx > 2...

3 days ago | 0

| accepted

Answered

Plotting Multiple Curves on the Same Graph

It depends on your function and what you want to do: t = linspace(0, 2*pi); freq = [1 5 9]; ampl = [1 2 3]; s = bsxfun(@tim...

Plotting Multiple Curves on the Same Graph

It depends on your function and what you want to do: t = linspace(0, 2*pi); freq = [1 5 9]; ampl = [1 2 3]; s = bsxfun(@tim...

3 days ago | 1

| accepted

Answered

How to add two cell arrays of the same dimensions

Try this: A = [{rand(1,4)} {rand(1,5)}]; B = [{rand(1,4)} {rand(1,5)}]; Out = cellfun(@plus, A, B, 'Uni',0)

How to add two cell arrays of the same dimensions

Try this: A = [{rand(1,4)} {rand(1,5)}]; B = [{rand(1,4)} {rand(1,5)}]; Out = cellfun(@plus, A, B, 'Uni',0)

3 days ago | 0

| accepted

Answered

why my plot not being displayed?

If your code involves array division, remember to use element-wise division: ./ rather than /.

why my plot not being displayed?

If your code involves array division, remember to use element-wise division: ./ rather than /.

3 days ago | 0

Answered

How can I extract the amplitudes of standared EEG bands in a 1 channel EEG signal

There are several posts that cover this. If you have R2018a or later, use the bandpass fucntion to design your filters. Get bo...

How can I extract the amplitudes of standared EEG bands in a 1 channel EEG signal

There are several posts that cover this. If you have R2018a or later, use the bandpass fucntion to design your filters. Get bo...

4 days ago | 0

| accepted

Answered

Boolean to return true if the cell is empty/nan

It would be easier if we had your code to work with. Try this: ~isnan(AU{row+1, col}) Address the cell elements using {}. ...

Boolean to return true if the cell is empty/nan

It would be easier if we had your code to work with. Try this: ~isnan(AU{row+1, col}) Address the cell elements using {}. ...

4 days ago | 0

Answered

Steps after ICA on unknown signals

ICA is not going to tell you that, because it does not know. It simply separates the signals. You must then so whatever sort o...

Steps after ICA on unknown signals

ICA is not going to tell you that, because it does not know. It simply separates the signals. You must then so whatever sort o...

4 days ago | 0

| accepted

Answered

how do I plot different 3D peaks in different locations in single polar plot

Try this: N = 500; rv = linspace(0, 1, N); % Radius Vector av = linspace(0, ...

how do I plot different 3D peaks in different locations in single polar plot

Try this: N = 500; rv = linspace(0, 1, N); % Radius Vector av = linspace(0, ...

4 days ago | 1

| accepted

Answered

bar plot cannot spread x axis homogeneously

Either add a xlim call, or define both axes limits at the same time, and replace your ylim call with an axis call: axis([0 20 ...

bar plot cannot spread x axis homogeneously

Either add a xlim call, or define both axes limits at the same time, and replace your ylim call with an axis call: axis([0 20 ...

4 days ago | 1

| accepted