12,273 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 can i plot ?

Try this: A=[2.8866 2.5708 2.9381 2.6234 2.7873 2.8535 3.5818 4.1817 3.6535 4.6312 4.2028 4.4...

how can i plot ?

Try this: A=[2.8866 2.5708 2.9381 2.6234 2.7873 2.8535 3.5818 4.1817 3.6535 4.6312 4.2028 4.4...

5 hours ago | 0

Answered

Plotting FRF with imaginary and real numbers

‘I would like to know if it is possible to plot the graphic of it (resulting in the natural frequencies and stuff) only having t...

Plotting FRF with imaginary and real numbers

‘I would like to know if it is possible to plot the graphic of it (resulting in the natural frequencies and stuff) only having t...

6 hours ago | 0

Answered

parameter estimation for a set of differential equations using fmincon function in matlab

You will likely find Monod kinetics and curve fitting helpful. (There are similar posts as well.) One way to force ‘dcdt’ to...

parameter estimation for a set of differential equations using fmincon function in matlab

You will likely find Monod kinetics and curve fitting helpful. (There are similar posts as well.) One way to force ‘dcdt’ to...

1 day ago | 0

Answered

How to integrate a set of coupled ODE's?

Your system is ‘stiff’, so use one of the stiff solvers instead of ode45: [t,y] = ode15s(@rate_eq,tspan,y0); With this chang...

How to integrate a set of coupled ODE's?

Your system is ‘stiff’, so use one of the stiff solvers instead of ode45: [t,y] = ode15s(@rate_eq,tspan,y0); With this chang...

1 day ago | 0

| accepted

Answered

there are more than 1 element satisfy the command in one column, but I only need to count it one time

Try this: maxTemp = max(data(:,4:end),[],2); Above41 = nnz(maxTemp > 41) producing: Above41 = 3

there are more than 1 element satisfy the command in one column, but I only need to count it one time

Try this: maxTemp = max(data(:,4:end),[],2); Above41 = nnz(maxTemp > 41) producing: Above41 = 3

1 day ago | 0

| accepted

Answered

matlab returns different result for same inputs

You may believe that the value of ‘x’ and the value of ‘x’ that are displayed are the same. They are likely much different, sin...

matlab returns different result for same inputs

You may believe that the value of ‘x’ and the value of ‘x’ that are displayed are the same. They are likely much different, sin...

1 day ago | 1

| accepted

Answered

find slope sign change of emg signal

Use the gradient function to produce results that are the same sizes as your data, not diff. If ‘EMG’ is your (30000x4) signa...

find slope sign change of emg signal

Use the gradient function to produce results that are the same sizes as your data, not diff. If ‘EMG’ is your (30000x4) signa...

1 day ago | 0

Answered

When do you detrend data or remove the mean?

Both detrending and removing the mean are essentially removing low-frequency baseline variations or a constant offset, respectiv...

When do you detrend data or remove the mean?

Both detrending and removing the mean are essentially removing low-frequency baseline variations or a constant offset, respectiv...

2 days ago | 0

Answered

how to plot step graph

I am not certain what a ‘step graph’ refers to. Try this: figure stairs(W, X, 'LineWidth',2) grid

how to plot step graph

I am not certain what a ‘step graph’ refers to. Try this: figure stairs(W, X, 'LineWidth',2) grid

2 days ago | 0

| accepted

Answered

How to fit differential equations to a curve

I would normally suggest that you see Monod kinetics and curve fitting and others. However this is actually a linear problem, s...

How to fit differential equations to a curve

I would normally suggest that you see Monod kinetics and curve fitting and others. However this is actually a linear problem, s...

2 days ago | 0

| accepted

Answered

how to fix invalid first data argument

Your code runs without error for me. Note that in your code ‘ii’ is never going to be less than 0, so the entire if block is ...

how to fix invalid first data argument

Your code runs without error for me. Note that in your code ‘ii’ is never going to be less than 0, so the entire if block is ...

2 days ago | 0

Answered

Cannot load default file for CWT

If you listed the entire result from running the ver function, it seems that you do not have the Wavelet Toolbox.

Cannot load default file for CWT

If you listed the entire result from running the ver function, it seems that you do not have the Wavelet Toolbox.

3 days ago | 0

| accepted

Answered

I have multiple equations that depend on a specific value and would like matlab to ask the user which equation to use and what the specific value is and then print that value but it's giving me trouble.

The 's' indicates that input for ‘lambda’ should return a character vector, so it does. If the materials are numbered, so the...

I have multiple equations that depend on a specific value and would like matlab to ask the user which equation to use and what the specific value is and then print that value but it's giving me trouble.

The 's' indicates that input for ‘lambda’ should return a character vector, so it does. If the materials are numbered, so the...

3 days ago | 0

Answered

4D matrix manipulation

I am not certain what you want. Try this: G = rand(365,31,24,91); % Create ‘G’ Gnew = reshape(...

4D matrix manipulation

I am not certain what you want. Try this: G = rand(365,31,24,91); % Create ‘G’ Gnew = reshape(...

3 days ago | 0

Answered

convert cell to integer

If ‘kar’ is initially: kar = {{[3]}}; try this: n = cell2mat(kar{:}) producing: n = 3

convert cell to integer

If ‘kar’ is initially: kar = {{[3]}}; try this: n = cell2mat(kar{:}) producing: n = 3

4 days ago | 0

Answered

Uncertainty for regressed parameters using nlinfit considering the uncertainty of data

If you want to calculate the confidence intervals on the parameters, use the nlparci function. If you want to calculate the con...

Uncertainty for regressed parameters using nlinfit considering the uncertainty of data

If you want to calculate the confidence intervals on the parameters, use the nlparci function. If you want to calculate the con...

4 days ago | 0

Answered

Regression on multi-variable data

This is a linear problem, so a linear solution will work. Try this: M = [1.48 1 0.9 0.69 0]; x = [8.526 5.6 6.9654 7 0]; ...

Regression on multi-variable data

This is a linear problem, so a linear solution will work. Try this: M = [1.48 1 0.9 0.69 0]; x = [8.526 5.6 6.9654 7 0]; ...

4 days ago | 0

Answered

How can I include a superscript in my x-label

The easiest approach is likely to use semilogx (or if appropriate, loglog) to plot your data. EDIT — I am not sure what tic...

How can I include a superscript in my x-label

The easiest approach is likely to use semilogx (or if appropriate, loglog) to plot your data. EDIT — I am not sure what tic...

4 days ago | 0

Answered

Error showing "Undefined function 'vecline' for input arguments of type 'sym'."

You misspelled it in your call to it. You defined it as: function vectline(f,crdaxis,crdrange,step) however you called it ...

Error showing "Undefined function 'vecline' for input arguments of type 'sym'."

You misspelled it in your call to it. You defined it as: function vectline(f,crdaxis,crdrange,step) however you called it ...

4 days ago | 1

Answered

How do I convert a .wav file to a .matlab file using wavread?

The wavread function was deprecated a while ago. Use the audioread function (R2012b and later versions) instead.

How do I convert a .wav file to a .matlab file using wavread?

The wavread function was deprecated a while ago. Use the audioread function (R2012b and later versions) instead.

4 days ago | 0

How do I convert a .wav file to a .matlab file using wavread?

The wavread function was deprecated a while ago. Use the audioread function (R2012b and later versions) instead.

4 days ago | 0

Answered

How to plot below function f

This is how I would do it: f = @(x) (x/4).*((x > 0) & (x < 1)) + (x/3).*(x >= 1); t = linspace(-5, 5); figure plot(t, f(t...

How to plot below function f

This is how I would do it: f = @(x) (x/4).*((x > 0) & (x < 1)) + (x/3).*(x >= 1); t = linspace(-5, 5); figure plot(t, f(t...

4 days ago | 0

| accepted

Answered

Contourf plot of datasets

You might find the griddata function useful. It takes random (x,y) values and interpolates gridded z-matrices from them that co...

Contourf plot of datasets

You might find the griddata function useful. It takes random (x,y) values and interpolates gridded z-matrices from them that co...

4 days ago | 1

| accepted

Answered

Phase spectrum without knowing frequency

The lower trace appears to be the negative derivative of the upper trace. So integrating the negative of the lower trace and ...

Phase spectrum without knowing frequency

The lower trace appears to be the negative derivative of the upper trace. So integrating the negative of the lower trace and ...

4 days ago | 0

| accepted

Answered

How to detect a column which gives me maximum value of the result.

Try this: x = rand(15); % Create Matrix y = rand(15,1); % C...

How to detect a column which gives me maximum value of the result.

Try this: x = rand(15); % Create Matrix y = rand(15,1); % C...

4 days ago | 1

Answered

Error using xlsread (line 257) Excel Worksheet could not be activated

The problem does not appear to be the Excel file, if you can read it correctly in R2017a. See if using the readmatrix function ...

Error using xlsread (line 257) Excel Worksheet could not be activated

The problem does not appear to be the Excel file, if you can read it correctly in R2017a. See if using the readmatrix function ...

4 days ago | 0

Answered

How do I convert a string to a date?

I am not certain if the numbers are themselves strings, or numbers. If they are numbers, this works: numdate = [20030930230...

How do I convert a string to a date?

I am not certain if the numbers are themselves strings, or numbers. If they are numbers, this works: numdate = [20030930230...

5 days ago | 0

| accepted

Answered

How to create a filter with Hz and coefficient?

A filter with 8000 coefficients is likely an FIR filter. For a simple bandpass or bandstop application, an IIR elliptical filte...

How to create a filter with Hz and coefficient?

A filter with 8000 coefficients is likely an FIR filter. For a simple bandpass or bandstop application, an IIR elliptical filte...

5 days ago | 0

Answered

Error: Index in position 2 exceeds array bounds

I recognised my code, so I went back and looked this up. (Reference: Error: Index in position 1 exceeds array bounds.) Your ...

Error: Index in position 2 exceeds array bounds

I recognised my code, so I went back and looked this up. (Reference: Error: Index in position 1 exceeds array bounds.) Your ...

5 days ago | 1

| accepted

Answered

finding peak to draw a smooth curve

Try this: x = 0:10; % Create Data y = rand(1,11); ...

finding peak to draw a smooth curve

Try this: x = 0:10; % Create Data y = rand(1,11); ...

5 days ago | 2

| accepted