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

Help finding intersecting points

Try this: W = 73000; %Airplane weight in lbs Alt = 30000; %altitude given at 30000 feet S = 950; %Area of the wing given in ...

Help finding intersecting points

Try this: W = 73000; %Airplane weight in lbs Alt = 30000; %altitude given at 30000 feet S = 950; %Area of the wing given in ...

1 hour ago | 1

| accepted

Answered

how to remove/reduce power line noise from a short signal?

‘... the sampling rate I have is 19200 Hz but the data is cut in epochs of 480 samples(non continous) and as such makes the freq...

how to remove/reduce power line noise from a short signal?

‘... the sampling rate I have is 19200 Hz but the data is cut in epochs of 480 samples(non continous) and as such makes the freq...

3 hours ago | 0

Answered

Locating global max in 3D plot

Try this: [maxval,Idx] = max(Pmusic(:)); [PmusicmaxRow,PmusicmaxCol] = ind2sub(size(Pmusic), Idx); I obviously cannot test t...

Locating global max in 3D plot

Try this: [maxval,Idx] = max(Pmusic(:)); [PmusicmaxRow,PmusicmaxCol] = ind2sub(size(Pmusic), Idx); I obviously cannot test t...

3 hours ago | 0

Answered

Optimization of system ODE

See the documentation section on Optimizing a Simulation or Ordinary Differential Equation

Optimization of system ODE

See the documentation section on Optimizing a Simulation or Ordinary Differential Equation

7 hours ago | 0

Answered

Filter Z Transform Implementation

The easiest way is to let the Control System Toolbox do the initial analysis: z = tf('z'); ...

Filter Z Transform Implementation

The easiest way is to let the Control System Toolbox do the initial analysis: z = tf('z'); ...

7 hours ago | 0

| accepted

Answered

'fix' function misbehaving

Temporarily set the format to long, and then also do: dZ = Z - 955 and check the result. This is most likely the result of r...

'fix' function misbehaving

Temporarily set the format to long, and then also do: dZ = Z - 955 and check the result. This is most likely the result of r...

1 day ago | 1

| accepted

Answered

What does the space on the resultant graph mean?

The space means that there are no data between the default grid limits that MATLAB chooses and the end of your data in the ‘spac...

What does the space on the resultant graph mean?

The space means that there are no data between the default grid limits that MATLAB chooses and the end of your data in the ‘spac...

1 day ago | 0

Answered

Finding the position of specific value in a vector without knowing the exact number

The find documentation section Last Several Nonzero Elements will let you return the indices of only some of the elements. You ...

Finding the position of specific value in a vector without knowing the exact number

The find documentation section Last Several Nonzero Elements will let you return the indices of only some of the elements. You ...

1 day ago | 0

Answered

Plotting multiple Magnitudes in one plot

Put the figure call before the loop, and remove the subplot call: figure hold on for i= 1:1:23 [u,o] = butter(1,[2*100/...

Plotting multiple Magnitudes in one plot

Put the figure call before the loop, and remove the subplot call: figure hold on for i= 1:1:23 [u,o] = butter(1,[2*100/...

1 day ago | 0

| accepted

Answered

Low pass filter VS high pass filter

Calculate the Fourier transform of the filter from the signals. t = ...; %...

Low pass filter VS high pass filter

Calculate the Fourier transform of the filter from the signals. t = ...; %...

1 day ago | 0

| accepted

Answered

How to plot 2D graph

If I understand correctly what you want to do, this should work: for t=1:20 for x=1:20 Sum=0; for n=1:1...

How to plot 2D graph

If I understand correctly what you want to do, this should work: for t=1:20 for x=1:20 Sum=0; for n=1:1...

2 days ago | 1

| accepted

Answered

All fixed points of function

If by ‘fixed points’ you intend ‘roots’, try this: f = @(x) cos(x) - 0.07 * x.^2; tv = linspace(-10, 10); fv = f(tv); zvi...

All fixed points of function

If by ‘fixed points’ you intend ‘roots’, try this: f = @(x) cos(x) - 0.07 * x.^2; tv = linspace(-10, 10); fv = f(tv); zvi...

2 days ago | 0

Answered

Interp2/Scatterinterp unstructured Data don't work!

Use the griddata function instead. Try this: Xm = load('X.mat'); X = Xm.Mecanical_Speed; Ym = load('Y.mat'); Y = Ym.Torq...

Interp2/Scatterinterp unstructured Data don't work!

Use the griddata function instead. Try this: Xm = load('X.mat'); X = Xm.Mecanical_Speed; Ym = load('Y.mat'); Y = Ym.Torq...

2 days ago | 0

| accepted

Answered

How to write name inside polygon?

Use the text function. Try this: pgon = polyshape([1 3 5 7],[2 6 4 1]); [xc,yc] = centroid(pgon); figure plot(pgon) a...

How to write name inside polygon?

Use the text function. Try this: pgon = polyshape([1 3 5 7],[2 6 4 1]); [xc,yc] = centroid(pgon); figure plot(pgon) a...

2 days ago | 1

| accepted

Answered

How to fit a CDF function on a dataset?

Try this: X = [0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8]; Y = [0 0.005 0....

How to fit a CDF function on a dataset?

Try this: X = [0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8]; Y = [0 0.005 0....

2 days ago | 0

Answered

How do I fix this code? It says "Conversion to function_handle is not possible" on the line f(×) = (x^4) - (10*x^3) + 5

First, fix the typographical errors. Remember that MATLAB is case-sensitive. Second, see the documentation section on Anonymo...

How do I fix this code? It says "Conversion to function_handle is not possible" on the line f(×) = (x^4) - (10*x^3) + 5

First, fix the typographical errors. Remember that MATLAB is case-sensitive. Second, see the documentation section on Anonymo...

2 days ago | 0

Answered

Filtering high frequencies from response signal

Try this: D1 = load('7004x4.mat'); T1 = D1.g; Q1 = T1(1:5,:); t = T1{:,1}; sm = T1{:,3}; t = rmmissing(t); sm = rmmiss...

Filtering high frequencies from response signal

Try this: D1 = load('7004x4.mat'); T1 = D1.g; Q1 = T1(1:5,:); t = T1{:,1}; sm = T1{:,3}; t = rmmissing(t); sm = rmmiss...

2 days ago | 0

| accepted

Answered

NPN Bipolar Transistor Characteristics

Run this from a script or your Command Window: doc 'NPN Bipolar Transistor Characteristics' That should bring up the example ...

NPN Bipolar Transistor Characteristics

Run this from a script or your Command Window: doc 'NPN Bipolar Transistor Characteristics' That should bring up the example ...

2 days ago | 0

Answered

Removing jumps from data when plotting a graph

I am not certain what result you want. Try this: D1 = readmatrix('SensorValues.xlsx'); s = D1; ...

Removing jumps from data when plotting a graph

I am not certain what result you want. Try this: D1 = readmatrix('SensorValues.xlsx'); s = D1; ...

2 days ago | 0

| accepted

Answered

Please, How do I determine the Mean Absolute Value (MAV) of an acoustic signal, which has positive and negative data points?

The mean value is the ‘average’ value. In almost all audio signals, the mean value is either 0 or close to 0. An electrocar...

Please, How do I determine the Mean Absolute Value (MAV) of an acoustic signal, which has positive and negative data points?

The mean value is the ‘average’ value. In almost all audio signals, the mean value is either 0 or close to 0. An electrocar...

3 days ago | 1

Answered

xlswrite is not recommended, what should I use instead?

Since you have R2020a, first, create a table using your data, then use writetable to write it to an Excel file (or other options...

xlswrite is not recommended, what should I use instead?

Since you have R2020a, first, create a table using your data, then use writetable to write it to an Excel file (or other options...

4 days ago | 1

Answered

Hello everyone, how to divide a piece of data into upper and lower parts along the y-axis with C point and D point as the boundary?

Try this: D = load('data1.mat'); data1 = D.data1; x = data1(:, 1); y = data1(:, 2); [C,ixmin] = min(x); [D,ixmax] = max...

Hello everyone, how to divide a piece of data into upper and lower parts along the y-axis with C point and D point as the boundary?

Try this: D = load('data1.mat'); data1 = D.data1; x = data1(:, 1); y = data1(:, 2); [C,ixmin] = min(x); [D,ixmax] = max...

4 days ago | 1

| accepted

Answered

Hodgkin-Huxley Error Code: Index exceeds the number of array elements (1)

Your differential equation returns a column vector of 4 elements, so it is necessary for the initial conditions vector and whate...

Hodgkin-Huxley Error Code: Index exceeds the number of array elements (1)

Your differential equation returns a column vector of 4 elements, so it is necessary for the initial conditions vector and whate...

4 days ago | 0

Answered

contourf plot gives white bands

Without your data, it is not possible to determine with any certainty what the problem is. Two observations: First, [X,...

contourf plot gives white bands

Without your data, it is not possible to determine with any certainty what the problem is. Two observations: First, [X,...

4 days ago | 0

Answered

Value of x for which AUC reaches a given value

‘I calculate the AUC using the trapz function.’ That being the problem. Use cumtrapz instead: t = linspace(0, 1, 500); ...

Value of x for which AUC reaches a given value

‘I calculate the AUC using the trapz function.’ That being the problem. Use cumtrapz instead: t = linspace(0, 1, 500); ...

4 days ago | 1

| accepted

Answered

How can I solve this equation in which variable is in power

One option is to use GlobalSearch: y = [2.1544; 1.71; 1.99; 1.59]; rhs = @(a,b,c,d) [a*(5.95.^b) + c.*(5.95.^d); a.*(6.72.^b)...

How can I solve this equation in which variable is in power

One option is to use GlobalSearch: y = [2.1544; 1.71; 1.99; 1.59]; rhs = @(a,b,c,d) [a*(5.95.^b) + c.*(5.95.^d); a.*(6.72.^b)...

4 days ago | 1

| accepted

Answered

running MATLAB ode45 back-to-back

‘The first state solution that is returned, is it the same as the initial condition?’ In my experience, yes. Sometimes it is...

running MATLAB ode45 back-to-back

‘The first state solution that is returned, is it the same as the initial condition?’ In my experience, yes. Sometimes it is...

4 days ago | 1

| accepted

Answered

How to flip the data upside down without flipping the axes?

I am not certain what result you want. Try this: x = [1 2 3]; y = [6 13 11]; figure plot(x,max(y)-y+min(y)) .

How to flip the data upside down without flipping the axes?

I am not certain what result you want. Try this: x = [1 2 3]; y = [6 13 11]; figure plot(x,max(y)-y+min(y)) .

4 days ago | 0

| accepted

Answered

Plot contour with 3 variables

The contour function requires matrices. You will need to create the matrices from your vectors. Try this (with your actual d...

Plot contour with 3 variables

The contour function requires matrices. You will need to create the matrices from your vectors. Try this (with your actual d...

4 days ago | 1

| accepted

Answered

how to apply bandpass filter to a .wav file

Use the bandpass function. For best results, also specify: 'ImpulseResponse','iir'

how to apply bandpass filter to a .wav file

Use the bandpass function. For best results, also specify: 'ImpulseResponse','iir'

4 days ago | 0

| accepted