12,268 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

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...

16 hours 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

17 hours 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...

21 hours 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 ...

22 hours ago | 0

Answered

How to check if one of output variables is not called

See if nargout or the nargoutchk function does what you want. According to the documentation: nargout returns the ...

How to check if one of output variables is not called

See if nargout or the nargoutchk function does what you want. According to the documentation: nargout returns the ...

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.

2 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...

2 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(...

2 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

2 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...

2 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]; ...

3 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...

3 days ago | 0

Answered

How to plot iterations?

I am not certain what you want to do. Try this: A=Pn-P; % Create ‘A’ nx=80; ny=40; ...

How to plot iterations?

I am not certain what you want to do. Try this: A=Pn-P; % Create ‘A’ nx=80; ny=40; ...

3 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 ...

3 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.

3 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.

3 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...

3 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...

3 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 ...

3 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...

3 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 ...

3 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...

4 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...

4 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 ...

4 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); ...

4 days ago | 2

| accepted

Answered

Build a matrix using an equation with known boundary values

I’m not certain what you want to do, however the MATLAB linspace function is probably the way to get there. Example — v = l...

Build a matrix using an equation with known boundary values

I’m not certain what you want to do, however the MATLAB linspace function is probably the way to get there. Example — v = l...

4 days ago | 0

| accepted

Answered

How to Subtract and Add across columns in Matlab?

In the documentation for diff, see Differences Between Matrix Columns. You need to specify the dimension. EDIT — With resp...

How to Subtract and Add across columns in Matlab?

In the documentation for diff, see Differences Between Matrix Columns. You need to specify the dimension. EDIT — With resp...

4 days ago | 0

| accepted

Answered

Cummulation in the rows

Try this: X = randi(9, 234, 1E+4); % Create Matrix for k = 1:size(X,1) sd(k,:) = std(...

Cummulation in the rows

Try this: X = randi(9, 234, 1E+4); % Create Matrix for k = 1:size(X,1) sd(k,:) = std(...

5 days ago | 0

| accepted

Answered

How can I solve the non linear algebraic equation system with a parameter

You can use the matlabFunction function to create an anonymous function from ‘F’ so you can use it with fsolve. However, you st...

How can I solve the non linear algebraic equation system with a parameter

You can use the matlabFunction function to create an anonymous function from ‘F’ so you can use it with fsolve. However, you st...

5 days ago | 0

| accepted

Answered

Plotting a frequency spectrum for an Impulse Response

Since the impulse has a uniform spectrum equal to unity, the impulse response of a system (control system, filter, etc.) is gene...

Plotting a frequency spectrum for an Impulse Response

Since the impulse has a uniform spectrum equal to unity, the impulse response of a system (control system, filter, etc.) is gene...

5 days ago | 0