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

Want to Get Plot To Have Contunuous Angles, Not Stay between -180 and +180 Degrees

The unwrap function works on radian angle measure. I am not certain how the angles were derived, however atan2d is another o...

Want to Get Plot To Have Contunuous Angles, Not Stay between -180 and +180 Degrees

The unwrap function works on radian angle measure. I am not certain how the angles were derived, however atan2d is another o...

circa un'ora ago | 0

Answered

How do I plot fourier transform signals in Matlab

f = @ (t) exp(-abs(t)).*cos(20*t); figure fplot(f) for the Symbolic Math Toolbox, this becomes: syms t f(t) = exp(-abs(...

How do I plot fourier transform signals in Matlab

f = @ (t) exp(-abs(t)).*cos(20*t); figure fplot(f) for the Symbolic Math Toolbox, this becomes: syms t f(t) = exp(-abs(...

circa 2 ore ago | 0

Answered

How to remove spurious lines?

Sort ‘velocity’: [velocity, idx] = sort(velocity); figure plot3(Freqs,velocity,filtered(idx)) ylim([-2 0]) xlim([2.5 15]...

How to remove spurious lines?

Sort ‘velocity’: [velocity, idx] = sort(velocity); figure plot3(Freqs,velocity,filtered(idx)) ylim([-2 0]) xlim([2.5 15]...

circa 3 ore ago | 0

Answered

Unknown variable complex equation

I ahve no idea what ‘Cp’ does here. Otherwise: gamma = 1.4; prat = @(Me,gamma) ((1+(gamma-1)/2.*Me.^2).^(gamma/(gamma-1)))...

Unknown variable complex equation

I ahve no idea what ‘Cp’ does here. Otherwise: gamma = 1.4; prat = @(Me,gamma) ((1+(gamma-1)/2.*Me.^2).^(gamma/(gamma-1)))...

circa 6 ore ago | 0

Answered

solve equation : Empty sym: 0-by-1

The Symbolic Math Toolbox may not be appropriate for this problem. Try this: freq = linspace(10*1e3, 31*1e6,100); w = 2*pi...

solve equation : Empty sym: 0-by-1

The Symbolic Math Toolbox may not be appropriate for this problem. Try this: freq = linspace(10*1e3, 31*1e6,100); w = 2*pi...

circa 8 ore ago | 0

Answered

plotting 2 variables as they change with respect to one another

The solution is to subscript ‘A’. Try this: gamma = 1.4; %M=1.53 Mv = (0.1:0.01:2.19); for k1 = 1:numel(Mv) M = Mv(...

plotting 2 variables as they change with respect to one another

The solution is to subscript ‘A’. Try this: gamma = 1.4; %M=1.53 Mv = (0.1:0.01:2.19); for k1 = 1:numel(Mv) M = Mv(...

circa 9 ore ago | 0

Answered

Divide matrix in subgroups

The mat2cell function will likely do what you want. Note that assigning each matrix to a different variable is not advisable....

Divide matrix in subgroups

The mat2cell function will likely do what you want. Note that assigning each matrix to a different variable is not advisable....

circa 11 ore ago | 0

Answered

Suggestions for financial simulation

That is an interesting problem! Use your favourite seach engine (I prefer DuckDuckGo) and search on: financial simulations usin...

Suggestions for financial simulation

That is an interesting problem! Use your favourite seach engine (I prefer DuckDuckGo) and search on: financial simulations usin...

circa 12 ore ago | 0

Answered

How do I extract the amplitude and the frequency from a sine function?

Use the fft function. Calculated, interpreted, and plotted correctly, it will give all that information.

How do I extract the amplitude and the frequency from a sine function?

Use the fft function. Calculated, interpreted, and plotted correctly, it will give all that information.

circa 12 ore ago | 0

Answered

Returning to a function and changing variables if ans is false?

I would do something like this, and treat it as an optimization (specifically root-finding) problem, returning the value of ‘dRo...

Returning to a function and changing variables if ans is false?

I would do something like this, and treat it as an optimization (specifically root-finding) problem, returning the value of ‘dRo...

circa 22 ore ago | 0

Answered

How to reduce the size of a graph to see the title and a legend that are not displayed?

Try something like this: figure plot( ... ) title( ... ) legend( ... ) pos = get(gcf, 'Position') set(gcf, 'Position',pos...

How to reduce the size of a graph to see the title and a legend that are not displayed?

Try something like this: figure plot( ... ) title( ... ) legend( ... ) pos = get(gcf, 'Position') set(gcf, 'Position',pos...

circa 23 ore ago | 0

Answered

Date time conversion problem

The posted code has errors. Try this: A = ['2015-01-01T19:00:00+0100' '2015-01-01T20:00:00+0100']; dates_extracted...

Date time conversion problem

The posted code has errors. Try this: A = ['2015-01-01T19:00:00+0100' '2015-01-01T20:00:00+0100']; dates_extracted...

circa 24 ore ago | 0

Answered

overlapping two contours and defining specific lines to be compared

See the contour documentation section on levels for details. To plot contours at 18°C, that would plot as: contour(X,Y,Z, [1 ...

overlapping two contours and defining specific lines to be compared

See the contour documentation section on levels for details. To plot contours at 18°C, that would plot as: contour(X,Y,Z, [1 ...

1 giorno ago | 0

Answered

Plotting errorbar on a set of data

I do not see ‘B’ anywhere. With ‘A’ as the matrix in the post, try this: Amean = mean(A(:,2:end),2); Astd = std(A(:,2:end)...

Plotting errorbar on a set of data

I do not see ‘B’ anywhere. With ‘A’ as the matrix in the post, try this: Amean = mean(A(:,2:end),2); Astd = std(A(:,2:end)...

1 giorno ago | 0

Answered

Parameters estimation using lsqcurvefit

I did not see this originally, or I would have responded to it several days ago. The code needed some tweaks (that I will let...

Parameters estimation using lsqcurvefit

I did not see this originally, or I would have responded to it several days ago. The code needed some tweaks (that I will let...

1 giorno ago | 1

| accepted

Answered

Error using mesh z must be a matrix

The arguments to ‘z’ need to be matrices in order for ‘z’ to be a matrix. Use ndgrid or meshgrid (linked to on that page) to cr...

Error using mesh z must be a matrix

The arguments to ‘z’ need to be matrices in order for ‘z’ to be a matrix. Use ndgrid or meshgrid (linked to on that page) to cr...

1 giorno ago | 0

Answered

How to represent continuous time Transfer function in a script

(1.) Correct! (2.) No.

How to represent continuous time Transfer function in a script

(1.) Correct! (2.) No.

2 giorni ago | 1

| accepted

Answered

How to fill plot between two lines

If I understand the objective correctly, this should work: DL = load('data1.mat'); data = DL.data; max=plot(data(:,1),data...

How to fill plot between two lines

If I understand the objective correctly, this should work: DL = load('data1.mat'); data = DL.data; max=plot(data(:,1),data...

2 giorni ago | 0

| accepted

Answered

System Identification impulseset function: how do I avoid using deprecated features?

The iddata call contains all the time information the identification functions need in order to estimate the system, in the arra...

System Identification impulseset function: how do I avoid using deprecated features?

The iddata call contains all the time information the identification functions need in order to estimate the system, in the arra...

2 giorni ago | 0

| accepted

Answered

Fit log10 function to data and determine the intercept

If ‘b’ is the y-intercept, the easiest way is to interpolate: x = [0.24, 0.6, 1.2, 2.4, 6, 12, 24]; y = [17.2499, 9.8872, 5.6...

Fit log10 function to data and determine the intercept

If ‘b’ is the y-intercept, the easiest way is to interpolate: x = [0.24, 0.6, 1.2, 2.4, 6, 12, 24]; y = [17.2499, 9.8872, 5.6...

2 giorni ago | 0

Answered

Nth order Butterworth low pass filter design

Since in radian measure the frequency is defined on the interval , and 1 is obviously in that interval, use 1 as ‘Wn’, since tha...

Nth order Butterworth low pass filter design

Since in radian measure the frequency is defined on the interval , and 1 is obviously in that interval, use 1 as ‘Wn’, since tha...

2 giorni ago | 0

Answered

how to normalize EKG/ ECG signal

See if the rescale function (introduced in R2017b) will do what you want.

how to normalize EKG/ ECG signal

See if the rescale function (introduced in R2017b) will do what you want.

2 giorni ago | 0

Answered

using 'controlchart' and 'findpeaks'

That is going to be something of a challenge, however it is possible. Using an example from the controlchart documentation: ...

using 'controlchart' and 'findpeaks'

That is going to be something of a challenge, however it is possible. Using an example from the controlchart documentation: ...

2 giorni ago | 0

| accepted

Answered

2D line graph plotting from calculations

There are too many missing variables for me to run the code, however consider doing something like this: k = 1; ...

2D line graph plotting from calculations

There are too many missing variables for me to run the code, however consider doing something like this: k = 1; ...

2 giorni ago | 0

Answered

Limits on a line plot

It may simply be necessary to ‘stretch’ the figure. Try something like this: pos = get(gcf, 'Position'); set(gcf, 'Positio...

Limits on a line plot

It may simply be necessary to ‘stretch’ the figure. Try something like this: pos = get(gcf, 'Position'); set(gcf, 'Positio...

2 giorni ago | 0

| accepted

Answered

Remove rows from table identified in a second string array

The ismember function would likely work, however the two tables you want to compare have nothing in common in the variables you ...

Remove rows from table identified in a second string array

The ismember function would likely work, however the two tables you want to compare have nothing in common in the variables you ...

2 giorni ago | 1

| accepted

Answered

amplitude and phase spectrum

No idea what the sampling frequency is, so I created one. Try this: Fs = 600; t = linspace(0, Fs*10, Fs*10)/Fs; x=8*cos(3...

amplitude and phase spectrum

No idea what the sampling frequency is, so I created one. Try this: Fs = 600; t = linspace(0, Fs*10, Fs*10)/Fs; x=8*cos(3...

2 giorni ago | 1

| accepted

Answered

High Pass Filter Error

The problem may be with ‘u_G_Interp’, and since we do not have it to work with, we cannot determine that. Assuming it is a do...

High Pass Filter Error

The problem may be with ‘u_G_Interp’, and since we do not have it to work with, we cannot determine that. Assuming it is a do...

2 giorni ago | 0

Answered

Add data on matlab graphs

Use a text object, or put it in the appropriate axis label: t = 0:0.1:15*pi; x = exp(-0.05*t).*cos(t); y = exp(-0.05*t).*sin...

Add data on matlab graphs

Use a text object, or put it in the appropriate axis label: t = 0:0.1:15*pi; x = exp(-0.05*t).*cos(t); y = exp(-0.05*t).*sin...

2 giorni ago | 1

| accepted

Answered

Cannot find solution with dsolve but I know that a relatively simple solution does exist

The dsolve function apparently does not integrate nonlinear differential equations. This is likely the best you can hope for:...

Cannot find solution with dsolve but I know that a relatively simple solution does exist

The dsolve function apparently does not integrate nonlinear differential equations. This is likely the best you can hope for:...

3 giorni ago | 0