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

high grade butterworth bandpass filter

Assign outputs: [z,p,k] = butter(10,[10 35]/1000); %10th-order butterworth bandpass filter then use zp2sos and use second-o...

high grade butterworth bandpass filter

Assign outputs: [z,p,k] = butter(10,[10 35]/1000); %10th-order butterworth bandpass filter then use zp2sos and use second-o...

21 minutes ago | 0

Answered

How to solve this equation in Matlab

Put everything on the right-hand side, so: f = @(d) expression - 30.19/d^2; then use fzero or fsolve or the Symbolic Math Too...

How to solve this equation in Matlab

Put everything on the right-hand side, so: f = @(d) expression - 30.19/d^2; then use fzero or fsolve or the Symbolic Math Too...

13 hours ago | 0

Answered

Why do I keep getting complex values from an if/else statement?

The problem is in the if block logic and the way MATLAB evaluates vectors. if r < 0.5 implies: if all(r < 0.5) that of co...

Why do I keep getting complex values from an if/else statement?

The problem is in the if block logic and the way MATLAB evaluates vectors. if r < 0.5 implies: if all(r < 0.5) that of co...

13 hours ago | 1

| accepted

Answered

Plotting Length vs Height

Without getting into the GUI itself, changing these lines (and their order): hp = ((f*(lp/D)*((V3^2)/(2*g)))-2.6681); % import...

Plotting Length vs Height

Without getting into the GUI itself, changing these lines (and their order): hp = ((f*(lp/D)*((V3^2)/(2*g)))-2.6681); % import...

14 hours ago | 0

Answered

gone gone gone deleted

Try this instead: x = fmincon(@(x)fun(x,rM3, R3, rM4, R4),x0,A,b) I cannot run your code since I don’t have the file. I assu...

gone gone gone deleted

Try this instead: x = fmincon(@(x)fun(x,rM3, R3, rM4, R4),x0,A,b) I cannot run your code since I don’t have the file. I assu...

14 hours ago | 0

Answered

how can i standardise the elements in a matrix

If you have R2018a or later, the normalize function will likely do what you want.

how can i standardise the elements in a matrix

If you have R2018a or later, the normalize function will likely do what you want.

14 hours ago | 1

Answered

Performance issues with readtable vs. xlsread

If you need to use xlsread, use it as long as you have it available. Since you obviously want the header information as well,...

Performance issues with readtable vs. xlsread

If you need to use xlsread, use it as long as you have it available. Since you obviously want the header information as well,...

19 hours ago | 0

Answered

To smooth the noisy signal with integral

I believe you have the correct approach. I would do something like this: f = 1/20; t=0:0.2:50; noise = randn(size(t));...

To smooth the noisy signal with integral

I believe you have the correct approach. I would do something like this: f = 1/20; t=0:0.2:50; noise = randn(size(t));...

21 hours ago | 0

Answered

can Matlab solve such a symbolic integral?

I am not certain what you want. This works in R2020b: syms A w t x f = sqrt(A + (w*x + t)^2); fint = int(f,x); fint = si...

can Matlab solve such a symbolic integral?

I am not certain what you want. This works in R2020b: syms A w t x f = sqrt(A + (w*x + t)^2); fint = int(f,x); fint = si...

22 hours ago | 1

| accepted

Answered

How to find the average peak values and plot?

Try this: m=1000; I1=0.5; I2=0.3; I3=0.2; L1=70*m; L2=140*m; n1=2; n2=1.444; index=n2; lam=m*(1.5:0.000001:1.6); Q12...

How to find the average peak values and plot?

Try this: m=1000; I1=0.5; I2=0.3; I3=0.2; L1=70*m; L2=140*m; n1=2; n2=1.444; index=n2; lam=m*(1.5:0.000001:1.6); Q12...

23 hours ago | 1

Answered

Matlab legend wont match graph

See if this slight modification does what you want: legend([h1(1), h2(1), h3(1), h4(1), h5(1), h6(1), h7(1), h8(1)],'Solar Arr...

Matlab legend wont match graph

See if this slight modification does what you want: legend([h1(1), h2(1), h3(1), h4(1), h5(1), h6(1), h7(1), h8(1)],'Solar Arr...

1 day ago | 0

| accepted

Answered

warning at the start of matlab software

See if this MathWorks Support Team explanation helps: Why do I receive the error "Warning: An error occurred while reading the d...

warning at the start of matlab software

See if this MathWorks Support Team explanation helps: Why do I receive the error "Warning: An error occurred while reading the d...

1 day ago | 0

| accepted

Answered

How do I read in this text file using fopen fclose and fscanf and then split each column into variables?

If you have R2013b or later, use readtable: T1 = readtable('car_data.txt', 'VariableNamingRule','preserve'); with: FirstFi...

How do I read in this text file using fopen fclose and fscanf and then split each column into variables?

If you have R2013b or later, use readtable: T1 = readtable('car_data.txt', 'VariableNamingRule','preserve'); with: FirstFi...

1 day ago | 0

Answered

Finding exponential decay of a*e^(-t*b)*sin(c*t) function

See if fitting it will do what you want. See for example How to filter noise from time-frequency data and find natural frequen...

Finding exponential decay of a*e^(-t*b)*sin(c*t) function

See if fitting it will do what you want. See for example How to filter noise from time-frequency data and find natural frequen...

1 day ago | 0

Answered

How can one get parameters of fitlm as an output?

First, see the documentation for F-Statistic, then see the documentation for anova, specifically tbl.

How can one get parameters of fitlm as an output?

First, see the documentation for F-Statistic, then see the documentation for anova, specifically tbl.

1 day ago | 0

| accepted

Answered

How to make a meshgrid out of 1D data?

Using oinly two points could prove to be a challenge. The griddata function might be easiest for this problem, however griddedI...

How to make a meshgrid out of 1D data?

Using oinly two points could prove to be a challenge. The griddata function might be easiest for this problem, however griddedI...

1 day ago | 0

Answered

Find the gradient using matlab code

You can do exactly what you want in either base MATLAB or using the Symbolic Math Toolbox. Please search the documentation us...

Find the gradient using matlab code

You can do exactly what you want in either base MATLAB or using the Symbolic Math Toolbox. Please search the documentation us...

2 days ago | 0

Answered

How to set the grid of the right yyaxis?

Another option is to create new right-axis tick positions to match the tick positions on the left: x1=[200, 300, 250, 520, 340...

How to set the grid of the right yyaxis?

Another option is to create new right-axis tick positions to match the tick positions on the left: x1=[200, 300, 250, 520, 340...

2 days ago | 0

| accepted

Answered

Concatenate signals ( sine wave and a line )

You are attempthing to vertically concatenate them. Use commas (,) instead fo semicolons(;) and it will work. Commas horizon...

Concatenate signals ( sine wave and a line )

You are attempthing to vertically concatenate them. Use commas (,) instead fo semicolons(;) and it will work. Commas horizon...

2 days ago | 1

Answered

Zone identification on curve

Try this: D = load('identification.mat'); var = D.var; x = 0:numel(var)-1; varfilt = sgolayfilt(var, 5, 271); Lmx = ...

Zone identification on curve

Try this: D = load('identification.mat'); var = D.var; x = 0:numel(var)-1; varfilt = sgolayfilt(var, 5, 271); Lmx = ...

2 days ago | 2

| accepted

Answered

Waveform Segmentation Using Deep Learning: Error on getmask

See if clicking on the Help radio buttion in the upper right corner of the MATLAB window, then scrolling down to Signal Processi...

Waveform Segmentation Using Deep Learning: Error on getmask

See if clicking on the Help radio buttion in the upper right corner of the MATLAB window, then scrolling down to Signal Processi...

3 days ago | 0

Answered

How to use custom X values for the findchangepts function?

The findchangepts function outputs the change points as a vector of integer indices. To put them in the context of your data,...

How to use custom X values for the findchangepts function?

The findchangepts function outputs the change points as a vector of integer indices. To put them in the context of your data,...

3 days ago | 0

Answered

How do I pick specific rows of a txt file and plot data?

Try this: D1 = readmatrix('collagen405.txt', 'HeaderLines',14); x = D1(:,1); y = D1(:,2); figure plot(x, y) grid title...

How do I pick specific rows of a txt file and plot data?

Try this: D1 = readmatrix('collagen405.txt', 'HeaderLines',14); x = D1(:,1); y = D1(:,2); figure plot(x, y) grid title...

3 days ago | 0

Answered

ODE45 must return column vector

Try this: I=[80,131,189,270,320,407,450,530,620,686,740,900,1095]; t2=[74,29,21,12,8,5.7,4.4,3.6,2.1,1.8,1.5,1.0,0.7]; a=....

ODE45 must return column vector

Try this: I=[80,131,189,270,320,407,450,530,620,686,740,900,1095]; t2=[74,29,21,12,8,5.7,4.4,3.6,2.1,1.8,1.5,1.0,0.7]; a=....

3 days ago | 0

| accepted

Answered

How to plot timeseries graph

For the data posted, one approach: T1 = readtable('mar2014ctd.xlsx', 'VariableNamingRule','preserve'); VarNames = T1.Properti...

How to plot timeseries graph

For the data posted, one approach: T1 = readtable('mar2014ctd.xlsx', 'VariableNamingRule','preserve'); VarNames = T1.Properti...

3 days ago | 0

Answered

Plotting a 3D surface model with colours from excel

I am not certain what result you want. One option: T1 = readtable('dagslysdata.xlsx', 'HeaderLines',3); Xv = linspace(min(...

Plotting a 3D surface model with colours from excel

I am not certain what result you want. One option: T1 = readtable('dagslysdata.xlsx', 'HeaderLines',3); Xv = linspace(min(...

3 days ago | 0

| accepted

Answered

I'm trying to plot this equation, if anyone can help

Take the square root of both sides, and plot: y = +sqrt(4*a*x); y = -sqrt(4*a*x); That’s how I would do it, anyway.

I'm trying to plot this equation, if anyone can help

Take the square root of both sides, and plot: y = +sqrt(4*a*x); y = -sqrt(4*a*x); That’s how I would do it, anyway.

4 days ago | 0

Answered

Compass of complex matrix, getting "dot indexing is not supported for variables of this type."

See if this does what you want: c = compass (SOUSLEDNA); c1 = c(1); c1.LineWidth = 2; c1.Color = 'r'; .

Compass of complex matrix, getting "dot indexing is not supported for variables of this type."

See if this does what you want: c = compass (SOUSLEDNA); c1 = c(1); c1.LineWidth = 2; c1.Color = 'r'; .

4 days ago | 1

| accepted

Answered

Boundary line for contour

Sometimes, a bit of absolute creativity (‘thinking outside the contour) is necessary. I first did a meshc plot of your matric...

Boundary line for contour

Sometimes, a bit of absolute creativity (‘thinking outside the contour) is necessary. I first did a meshc plot of your matric...

4 days ago | 1

| accepted

Answered

ODE45; Length of initial conditions vector not accepted

See if this does what you want: function ddx = odefcn(t,v,W,k,rho,S,R,m,P,c_Do) A_0 = (4.654*W*cos(t)*k)/(rho*S) - W*sin(...

ODE45; Length of initial conditions vector not accepted

See if this does what you want: function ddx = odefcn(t,v,W,k,rho,S,R,m,P,c_Do) A_0 = (4.654*W*cos(t)*k)/(rho*S) - W*sin(...

4 days ago | 0

| accepted