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

Counting amount of digit occurrence in a cell

Try something like this — CellArray = num2cell([2; 2; 2; 2; 2; 2; 2; 3; 9]); [Uc,~,ix] = unique([CellArray{:}],'stable'); Co...

Counting amount of digit occurrence in a cell

Try something like this — CellArray = num2cell([2; 2; 2; 2; 2; 2; 2; 3; 9]); [Uc,~,ix] = unique([CellArray{:}],'stable'); Co...

2 hours ago | 1

| accepted

Answered

How to get z-score from Kruskal Wallis test.

See if the norminv function will do what you want.

How to get z-score from Kruskal Wallis test.

See if the norminv function will do what you want.

3 hours ago | 0

Answered

Is there a way to "Save" a link to a MATLAB Answer?

You can Follow them. I save the ones I find particularly interesting (including some of my own) as Bookmarks (Firefox) in dif...

Is there a way to "Save" a link to a MATLAB Answer?

You can Follow them. I save the ones I find particularly interesting (including some of my own) as Bookmarks (Firefox) in dif...

5 hours ago | 2

Answered

findchangepts use for multiple files

That’s actually not how findchangepts works (or at least is designed to work as I understand it). It finds changes in a signal ...

findchangepts use for multiple files

That’s actually not how findchangepts works (or at least is designed to work as I understand it). It finds changes in a signal ...

12 hours ago | 0

Answered

Interpreting FFT Graph with Noise Floor

Try this — X = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/613760/tapedata.csv'); t = readmatr...

Interpreting FFT Graph with Noise Floor

Try this — X = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/613760/tapedata.csv'); t = readmatr...

23 hours ago | 0

| accepted

Answered

How to plot concentration Hb?

Use the bar and plot functions. The cross-hatching is not a standard option, so it will likely be necessary to simply use sol...

How to plot concentration Hb?

Use the bar and plot functions. The cross-hatching is not a standard option, so it will likely be necessary to simply use sol...

1 day ago | 0

| accepted

Answered

i have Question about Inverse lapalce transform & plot

Try this — syms s R = 1/s G = 75/(s)^2+10.25*s+100.65 F = R * G a = ilaplace (F) % x = t t = [0 10]; y = a; fplot(y,t)...

i have Question about Inverse lapalce transform & plot

Try this — syms s R = 1/s G = 75/(s)^2+10.25*s+100.65 F = R * G a = ilaplace (F) % x = t t = [0 10]; y = a; fplot(y,t)...

1 day ago | 0

| accepted

Answered

Changing size label in xline

Try this — x = linspace(0,6,100); y = exp(x); plot(x,y) hxl = xline(4.5,'-',{'Acceptable','Limit'}); x = linspace(0,6,...

Changing size label in xline

Try this — x = linspace(0,6,100); y = exp(x); plot(x,y) hxl = xline(4.5,'-',{'Acceptable','Limit'}); x = linspace(0,6,...

1 day ago | 0

| accepted

Answered

Is there FWHM function in frequency domain

Try it — a = 2; p = @(t) exp(-(a*t).^2) t = linspace(-5,5); figure plot(t, p(t)) grid P = fft(p(t))/numel(t); Ts ...

Is there FWHM function in frequency domain

Try it — a = 2; p = @(t) exp(-(a*t).^2) t = linspace(-5,5); figure plot(t, p(t)) grid P = fft(p(t))/numel(t); Ts ...

1 day ago | 0

| accepted

Answered

How to use 'trapz' command in a foor loop

The problem is that ‘S_v’ has only one non-singleton dimension (i.e. it is a vector). That is throwing the error. Chan...

How to use 'trapz' command in a foor loop

The problem is that ‘S_v’ has only one non-singleton dimension (i.e. it is a vector). That is throwing the error. Chan...

1 day ago | 0

| accepted

Answered

Matlab solves differential equations but returns empty plots

It is not possible to do anything with the images provided. Perhaps something like: Fds = vpa(Fds) figure fplot(Fds) a...

Matlab solves differential equations but returns empty plots

It is not possible to do anything with the images provided. Perhaps something like: Fds = vpa(Fds) figure fplot(Fds) a...

1 day ago | 0

Answered

How to rotate 3D surface matrices

It depends on what you want to do. To rotate the surface in the axes, use the rotate function. To change the viewpoint (ca...

How to rotate 3D surface matrices

It depends on what you want to do. To rotate the surface in the axes, use the rotate function. To change the viewpoint (ca...

1 day ago | 0

| accepted

Answered

Plot discrete fourier transform of a sine wave

Try this — f = 6000; fs = 16000; w = 2*pi*(f/fs); N = 50; n = 0:N; y = sin(w.*n); subplot(2,1,1); stem(n,y); f = -...

Plot discrete fourier transform of a sine wave

Try this — f = 6000; fs = 16000; w = 2*pi*(f/fs); N = 50; n = 0:N; y = sin(w.*n); subplot(2,1,1); stem(n,y); f = -...

1 day ago | 0

| accepted

Answered

Develop a cleaner stem plot (Magnitude Spectra)

These are two-sided fft plots. I’m not certain what ‘cleaner’ is in this context, however using the fftshift function, then c...

Develop a cleaner stem plot (Magnitude Spectra)

These are two-sided fft plots. I’m not certain what ‘cleaner’ is in this context, however using the fftshift function, then c...

2 days ago | 0

| accepted

Answered

How to solve Coupled Differential Equations

Try this — syms x(t) y(t) x0 y0 Dx = diff(x); Dy = diff(y); ode1 = Dy-Dx == 2 - x ode2 = 2-Dy - Dy == 3 + 2*y S = dsolve...

How to solve Coupled Differential Equations

Try this — syms x(t) y(t) x0 y0 Dx = diff(x); Dy = diff(y); ode1 = Dy-Dx == 2 - x ode2 = 2-Dy - Dy == 3 + 2*y S = dsolve...

2 days ago | 0

Answered

How to interpolate a matrix ?

Try this — M=[ 3.2 5 4.1 4 5.6 3 6.7 ...

How to interpolate a matrix ?

Try this — M=[ 3.2 5 4.1 4 5.6 3 6.7 ...

2 days ago | 0

| accepted

Answered

Vector counting syntax help?

Try this — A = [1 1 1 1 2 3 3 5 5 5 5 6 6 7]; [Au,~,ix] = unique(A,'stable'); Count = accumarray(ix,1); Result = table(Au(:...

Vector counting syntax help?

Try this — A = [1 1 1 1 2 3 3 5 5 5 5 6 6 7]; [Au,~,ix] = unique(A,'stable'); Count = accumarray(ix,1); Result = table(Au(:...

2 days ago | 0

| accepted

Answered

How to get multiple variables in 'assume' ?

Declare them in the syms call as positive. MATLAB defines positive as values greater than 0. See the documentation section o...

How to get multiple variables in 'assume' ?

Declare them in the syms call as positive. MATLAB defines positive as values greater than 0. See the documentation section o...

2 days ago | 0

| accepted

Answered

signal does not show filtered, using filter()

Use freqz to see what the filters are actually doing — Fs1 = 500; %Sampling Frequency ync = [.25, .5, .25]; ync1 = [-.085 ....

signal does not show filtered, using filter()

Use freqz to see what the filters are actually doing — Fs1 = 500; %Sampling Frequency ync = [.25, .5, .25]; ync1 = [-.085 ....

3 days ago | 0

| accepted

Answered

Trying to fit parameters for an ODE model to real data using lsqcurvefit

‘... I can't seem to find any real differences between the code I've constructed and that example.’ I agree that the initial ...

Trying to fit parameters for an ODE model to real data using lsqcurvefit

‘... I can't seem to find any real differences between the code I've constructed and that example.’ I agree that the initial ...

3 days ago | 0

| accepted

Answered

how take a mathematical function from user

I would use the inputdlg function — prompt = {'Enter f(x,y):', 'Enter g(x):'}; response = inputdlg(prompt) f = str2func(['@(...

how take a mathematical function from user

I would use the inputdlg function — prompt = {'Enter f(x,y):', 'Enter g(x):'}; response = inputdlg(prompt) f = str2func(['@(...

3 days ago | 0

Answered

Characteristics of a step response plot

Try something like this (using a transfer function from the documentation) — sys = tf([1 5 5],[1 1.65 5 6.5 2]); stinf = step...

Characteristics of a step response plot

Try something like this (using a transfer function from the documentation) — sys = tf([1 5 5],[1 1.65 5 6.5 2]); stinf = step...

3 days ago | 0

Answered

I want to separate the signal from the noise with the help of a low pass filter.

I could not figure out which of those signals you want to filter, so I arbitrarily chose ‘t1’ and ‘y1’. They are not consiste...

I want to separate the signal from the noise with the help of a low pass filter.

I could not figure out which of those signals you want to filter, so I arbitrarily chose ‘t1’ and ‘y1’. They are not consiste...

3 days ago | 0

Answered

How to change X axis in the form of percentage

Try something like this — x = linspace(77, 146); y = -60 - 15*sin(2*pi*x/50); figure plot(x, y) Ax = gca; xt = Ax.XTick...

How to change X axis in the form of percentage

Try something like this — x = linspace(77, 146); y = -60 - 15*sin(2*pi*x/50); figure plot(x, y) Ax = gca; xt = Ax.XTick...

3 days ago | 1

Answered

Plotting a filter as a function of cyclic frequency using freqz()

Your approach is correct. The reason the freqz plot did not look correct is that you were passing the filtered signal to it, no...

Plotting a filter as a function of cyclic frequency using freqz()

Your approach is correct. The reason the freqz plot did not look correct is that you were passing the filtered signal to it, no...

4 days ago | 0

| accepted

Answered

Coupled second order differential equation

Start by writing the equations using the Symbolic Math Toolbox. Specifically, see the documentation on the dsolve function. ...

Coupled second order differential equation

Start by writing the equations using the Symbolic Math Toolbox. Specifically, see the documentation on the dsolve function. ...

4 days ago | 0

Answered

ode45 not working

There are a few errors, all easily solved. Try this — m = 5; g = 9.81; r = 0.470; I = 0.37; ks = 0.012; dt = 0.01; ...

ode45 not working

There are a few errors, all easily solved. Try this — m = 5; g = 9.81; r = 0.470; I = 0.37; ks = 0.012; dt = 0.01; ...

4 days ago | 0

Answered

How to tell matlab that y is a function of x; not a constant

In the initial syms call, declare ‘y(x)’ instead of ‘y’ — syms x y(x) z z=x*y; Dz = diff(z,x) ...

How to tell matlab that y is a function of x; not a constant

In the initial syms call, declare ‘y(x)’ instead of ‘y’ — syms x y(x) z z=x*y; Dz = diff(z,x) ...

4 days ago | 1

| accepted

Answered

Locating rising peaks of variable amplitude pulses

I am not certain what you are doing, or what the ‘overlaid pulses situation’ means. There appears to be a significant amount ...

Locating rising peaks of variable amplitude pulses

I am not certain what you are doing, or what the ‘overlaid pulses situation’ means. There appears to be a significant amount ...

4 days ago | 0

Answered

How do I make a low-pass filter on this data set?

For an EKG, use the bandpass function with the lower cutoff at 1.5 Hz and the upper cutoff between 45 Hz (if there is mains or p...

How do I make a low-pass filter on this data set?

For an EKG, use the bandpass function with the lower cutoff at 1.5 Hz and the upper cutoff between 45 Hz (if there is mains or p...

5 days ago | 0