11,937 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 do you section data that has peaks and troughs

I noticed that visually, the frequency content of the ‘walking’ and ‘running’ segments were different, and while I had problems ...

How do you section data that has peaks and troughs

I noticed that visually, the frequency content of the ‘walking’ and ‘running’ segments were different, and while I had problems ...

2 hours ago | 0

Answered

Find maximum in matrix and show

If I understand correctly what you want to do, use the max (link) function. To get the maximum of every column of your matrix...

Find maximum in matrix and show

If I understand correctly what you want to do, use the max (link) function. To get the maximum of every column of your matrix...

8 hours ago | 0

Answered

FIR and IIR EEG signal

See: How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG and Help With Starting Point for a Low Pass Filte...

FIR and IIR EEG signal

See: How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG and Help With Starting Point for a Low Pass Filte...

9 hours ago | 0

Answered

How to plot an integral

‘But nothing comes out on the graph.’ The result of the int function is a constant. At best, you will get a straight line. ...

How to plot an integral

‘But nothing comes out on the graph.’ The result of the int function is a constant. At best, you will get a straight line. ...

1 day ago | 0

| accepted

Answered

random numbers can be divided b

Try this: r5 = randi(10,1,20)*5; % Creates 20 Random Integers From 5 To 50, All Of Which Can Be Divided E...

random numbers can be divided b

Try this: r5 = randi(10,1,20)*5; % Creates 20 Random Integers From 5 To 50, All Of Which Can Be Divided E...

1 day ago | 0

| accepted

Answered

How to plot contour without interpolation on a nonuniform grid?

Have you experimented to see how contour (or contourf) works with your data? Did the function throw an error? If not, just l...

How to plot contour without interpolation on a nonuniform grid?

Have you experimented to see how contour (or contourf) works with your data? Did the function throw an error? If not, just l...

1 day ago | 0

Answered

add numbers to an array correspondingly

Use bsxfun: A = [ 6 10 14 ]; B = [0.0152 0.0134 0.0120 0.0121 0.0109 0.0100 0.0089 0.0084 0...

add numbers to an array correspondingly

Use bsxfun: A = [ 6 10 14 ]; B = [0.0152 0.0134 0.0120 0.0121 0.0109 0.0100 0.0089 0.0084 0...

1 day ago | 0

Answered

Index exceeds the number of array elements (10), How do I solve this error??

Five lines above it, you initialise the for loop as: for xx=1:11 Perhaps: for xx=1:10 will eliminate the error

Index exceeds the number of array elements (10), How do I solve this error??

Five lines above it, you initialise the for loop as: for xx=1:11 Perhaps: for xx=1:10 will eliminate the error

1 day ago | 0

Answered

How to separate matrix elements based on randomized indices

If you want, you can do it without an expressed loop (the accumarray function of course loops internally): a = randi(9,2,10); ...

How to separate matrix elements based on randomized indices

If you want, you can do it without an expressed loop (the accumarray function of course loops internally): a = randi(9,2,10); ...

2 days ago | 0

Answered

How to exclude a variable from fit by custom function.

Try this: T = 42; % Defined In Your Workspace y = @(a,g,x) a+g./(exp(T./x)-1); T...

How to exclude a variable from fit by custom function.

Try this: T = 42; % Defined In Your Workspace y = @(a,g,x) a+g./(exp(T./x)-1); T...

2 days ago | 0

Answered

Temperature contour plot from x,y coordinates and corresponding Temperatures?

See if the griddata (link) function will do what you want.

Temperature contour plot from x,y coordinates and corresponding Temperatures?

See if the griddata (link) function will do what you want.

2 days ago | 0

| accepted

Answered

How to use condition to output a new matrix

Just use one &: if (Sim_EVT > CB) & (Sim_EVT <(CB+CA))) You can probably do ths in one line: ClassB2 = (CA.*0.7761194...

How to use condition to output a new matrix

Just use one &: if (Sim_EVT > CB) & (Sim_EVT <(CB+CA))) You can probably do ths in one line: ClassB2 = (CA.*0.7761194...

2 days ago | 0

| accepted

Answered

if-statement with conditions.

You can safely delete this assignment: condintion = in1 < in2; because it overwrites the ‘condition’ argument. You can als...

if-statement with conditions.

You can safely delete this assignment: condintion = in1 < in2; because it overwrites the ‘condition’ argument. You can als...

2 days ago | 0

Answered

How can I compute spectrogram for data vector containing NaN values?

If you have R2016b or later, you can use the fillmissing (link) function.

How can I compute spectrogram for data vector containing NaN values?

If you have R2016b or later, you can use the fillmissing (link) function.

2 days ago | 0

Answered

Please rectify the error in the code

Try this instead: semilogy(SNR,[The_awgn; The_rayl; BER1'; BER2']);

Please rectify the error in the code

Try this instead: semilogy(SNR,[The_awgn; The_rayl; BER1'; BER2']);

3 days ago | 1

| accepted

Answered

How can I plot arrows over a function? (For ODE solution)

Try this: t = linspace(0, 2, 25); h = t(2)-t(1); s = sin(2*pi*t/max(t)); ds = gradient(s,h); dt = gradient(t,h); figure...

How can I plot arrows over a function? (For ODE solution)

Try this: t = linspace(0, 2, 25); h = t(2)-t(1); s = sin(2*pi*t/max(t)); ds = gradient(s,h); dt = gradient(t,h); figure...

3 days ago | 0

Answered

How to scan a variable for a certain pattern

Try this example: x = randi([0 1], 1, 100) idx = strfind(num2str(x, '%d'), '101101') I’m not exactly certain what you want t...

How to scan a variable for a certain pattern

Try this example: x = randi([0 1], 1, 100) idx = strfind(num2str(x, '%d'), '101101') I’m not exactly certain what you want t...

3 days ago | 0

Answered

I want to find the standard deviation of each data point in the matrix.

If you have R2018a or later, use the normalize (link) funciton. It returns the z-scores of your data. Otherwise, this prod...

I want to find the standard deviation of each data point in the matrix.

If you have R2018a or later, use the normalize (link) funciton. It returns the z-scores of your data. Otherwise, this prod...

3 days ago | 0

Answered

How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG

The Signal Processing Toolbox is best for this. See: Remove the 60 Hz Hum from a Signal (link). You’ll need to design a separa...

How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG

The Signal Processing Toolbox is best for this. See: Remove the 60 Hz Hum from a Signal (link). You’ll need to design a separa...

3 days ago | 1

| accepted

Answered

Segmentation of audio signal.

Try this: s = 0.1*randn(1E+4,1)+sin(0.02*pi*(1:1E+4)'-1); % Signal (Column Vector) L = numel(s); ...

Segmentation of audio signal.

Try this: s = 0.1*randn(1E+4,1)+sin(0.02*pi*(1:1E+4)'-1); % Signal (Column Vector) L = numel(s); ...

3 days ago | 0

Answered

frequency vector in a fft

Try this: plot(f,ccf(1:numel(f))*2) That should do what you want. (It plots the ‘positive half’ of the fft result, from D-C ...

frequency vector in a fft

Try this: plot(f,ccf(1:numel(f))*2) That should do what you want. (It plots the ‘positive half’ of the fft result, from D-C ...

3 days ago | 1

| accepted

Answered

How can I plot 2 vectors of different length?

Without knowing any constraints you may have, try this: data = rand(1, 32); % Create Data ...

How can I plot 2 vectors of different length?

Without knowing any constraints you may have, try this: data = rand(1, 32); % Create Data ...

4 days ago | 1

| accepted

Answered

is there a bandwidth limit on the bandstop filter

The easiest way to see what’s going on with it is to use fvtool to look at it, and to give it a short random signal to look at t...

is there a bandwidth limit on the bandstop filter

The easiest way to see what’s going on with it is to use fvtool to look at it, and to give it a short random signal to look at t...

4 days ago | 0

| accepted

Answered

How can I specify axis spacing?

One option: x = [4 8 16 32 64 128 256 512 1024]; plot(log2(x), Y) set(gca,'XTick',log2(x), 'XTickLabel',x) It would be a bi...

How can I specify axis spacing?

One option: x = [4 8 16 32 64 128 256 512 1024]; plot(log2(x), Y) set(gca,'XTick',log2(x), 'XTickLabel',x) It would be a bi...

4 days ago | 0

| accepted

Answered

Using wrapTo2Pi without toolbox

I wrote a little utility function for my own use to do just that: Angles2pi = @(a) rem(2*pi+a, 2*pi); % F...

Using wrapTo2Pi without toolbox

I wrote a little utility function for my own use to do just that: Angles2pi = @(a) rem(2*pi+a, 2*pi); % F...

4 days ago | 1

| accepted

Answered

Error function plot with two variables

You will need the meshgrid (link) or (ndgrid (linked to on that page)) functions, and the surf (link) (or mesh (linked to on tha...

Error function plot with two variables

You will need the meshgrid (link) or (ndgrid (linked to on that page)) functions, and the surf (link) (or mesh (linked to on tha...

4 days ago | 0

Answered

Voice waveform in Matlab

The plot appears to be data. Your reference to ‘coding’ it is at best ambiguous. If you want to analyse it, one option is ce...

Voice waveform in Matlab

The plot appears to be data. Your reference to ‘coding’ it is at best ambiguous. If you want to analyse it, one option is ce...

4 days ago | 0

| accepted

Answered

How can I export a 2D cell into either a .csv or .xls file?

I’m not certain what your cell contains. One option is to use the cell2mat (link) functiion to convert it to a matrix, then u...

How can I export a 2D cell into either a .csv or .xls file?

I’m not certain what your cell contains. One option is to use the cell2mat (link) functiion to convert it to a matrix, then u...

5 days ago | 0

Answered

plotting the confidence bands

I can’t run your code because the patch call you posted is corrupt. Try this in place of your set calls: xt = get(gca, 'XTi...

plotting the confidence bands

I can’t run your code because the patch call you posted is corrupt. Try this in place of your set calls: xt = get(gca, 'XTi...

5 days ago | 0