10,129 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

Plot frequency in a histogram

I am not certain what you want. Try this: click = randi([0 1], 1, 100); % C...

Plot frequency in a histogram

I am not certain what you want. Try this: click = randi([0 1], 1, 100); % C...

5 hours ago | 0

Answered

How to find dominant frequency of a vector?

I have no idea what your signal looks like. The *|0|* Hz peak is the d-c (constant) offset. The easiest way to eliminate it is...

How to find dominant frequency of a vector?

I have no idea what your signal looks like. The *|0|* Hz peak is the d-c (constant) offset. The easiest way to eliminate it is...

5 hours ago | 0

Answered

How to find the peridicity contained in an image

Because of the arc, the only way to determine the periodicity may be to calculate the angles for each radial element, and then a...

How to find the peridicity contained in an image

Because of the arc, the only way to determine the periodicity may be to calculate the angles for each radial element, and then a...

6 hours ago | 0

Answered

From k-space to phase plot

See if the <https://www.mathworks.com/help/matlab/ref/angle.html *|angle|*> (link) and <https://www.mathworks.com/help/matlab/re...

From k-space to phase plot

See if the <https://www.mathworks.com/help/matlab/ref/angle.html *|angle|*> (link) and <https://www.mathworks.com/help/matlab/re...

12 hours ago | 0

| accepted

Answered

How do I Fit one differential equation with multiple variables using lsqcurvefit and ode45

See any of these: * <https://www.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting#comment_89455 *M...

How do I Fit one differential equation with multiple variables using lsqcurvefit and ode45

See any of these: * <https://www.mathworks.com/matlabcentral/answers/43439-monod-kinetics-and-curve-fitting#comment_89455 *M...

2 days ago | 0

Answered

How to plot function from m file with vectors

First, vectorizing will help: F = 2 * x(1).^2 - x(2).^2; Second, you are confusing *|fplot|*, since it does not know wh...

How to plot function from m file with vectors

First, vectorizing will help: F = 2 * x(1).^2 - x(2).^2; Second, you are confusing *|fplot|*, since it does not know wh...

3 days ago | 0

Answered

Function file that removes a character in a string?

This replaces the hyphen with a space. You can use the loop if you want. You simply have to tweak it: n = length(str...

Function file that removes a character in a string?

This replaces the hyphen with a space. You can use the loop if you want. You simply have to tweak it: n = length(str...

4 days ago | 1

| accepted

Answered

How can I plot this function containing definite integral?

If you are integrating both with respect to ‘alpha’ (since the variable of integration of the second integral is not visible, al...

How can I plot this function containing definite integral?

If you are integrating both with respect to ‘alpha’ (since the variable of integration of the second integral is not visible, al...

4 days ago | 0

| accepted

Answered

How to replace findpeaks() with another function

If the MATLAB version is *|R2017b|* or later, the <https://www.mathworks.com/help/matlab/ref/islocalmax.html *|islocalmax|*> (li...

How to replace findpeaks() with another function

If the MATLAB version is *|R2017b|* or later, the <https://www.mathworks.com/help/matlab/ref/islocalmax.html *|islocalmax|*> (li...

4 days ago | 2

Answered

Using int for fun.

You are close to solving it. You need to express *|‘q’|* as an anonymous function of *|‘w’|*, then evaluate that function over ...

Using int for fun.

You are close to solving it. You need to express *|‘q’|* as an anonymous function of *|‘w’|*, then evaluate that function over ...

4 days ago | 0

| accepted

Answered

generate a bandpass signal

If you have *|R2018a|* (or later) use the <https://www.mathworks.com/help/signal/ref/bandpass.html *|bandpass|*> (link) function...

generate a bandpass signal

If you have *|R2018a|* (or later) use the <https://www.mathworks.com/help/signal/ref/bandpass.html *|bandpass|*> (link) function...

5 days ago | 0

Answered

How can i solve equation with integral and unknown?

I have no idea what you are doing. This runs: [kb, T, Nc, Nd, Ec, Ed] = deal(3,5,7,11,13,17); ...

How can i solve equation with integral and unknown?

I have no idea what you are doing. This runs: [kb, T, Nc, Nd, Ec, Ed] = deal(3,5,7,11,13,17); ...

5 days ago | 0

Answered

How do I repeat a function on each and every column of a 241X1236 array?

I would save them in a cell array: cwtc = cell(size(All_mean,2),1); % Preallocate Ce...

How do I repeat a function on each and every column of a 241X1236 array?

I would save them in a cell array: cwtc = cell(size(All_mean,2),1); % Preallocate Ce...

6 days ago | 1

| accepted

Answered

Hello, I am trying to solve an equation involving two vectors.

No need for the loop. Just use the <https://www.mathworks.com/help/matlab/ref/mrdivide.html *|mrdivide,/|*> (link) function: ...

Hello, I am trying to solve an equation involving two vectors.

No need for the loop. Just use the <https://www.mathworks.com/help/matlab/ref/mrdivide.html *|mrdivide,/|*> (link) function: ...

6 days ago | 0

| accepted

Answered

How to check that two column vectors are multiple of each other?

One option is to concatenate them and then use the *|rank|* function to check to see if they are linearly dependent. For th...

How to check that two column vectors are multiple of each other?

One option is to concatenate them and then use the *|rank|* function to check to see if they are linearly dependent. For th...

6 days ago | 0

| accepted

Answered

cutting up the signal into repeating parts

I seem to have seen this waveform somewhere else recently! Try this: D = xlsread('Star11.xls'); tv = D(:,1); ap...

cutting up the signal into repeating parts

I seem to have seen this waveform somewhere else recently! Try this: D = xlsread('Star11.xls'); tv = D(:,1); ap...

7 days ago | 3

| accepted

Answered

Z-Transform of difference Equation

Use the <https://www.mathworks.com/help/symbolic/subs.html *|subs|*> (link) function: X = subs(X, {ztrans(y(n), n, z), y(-...

Z-Transform of difference Equation

Use the <https://www.mathworks.com/help/symbolic/subs.html *|subs|*> (link) function: X = subs(X, {ztrans(y(n), n, z), y(-...

7 days ago | 0

| accepted

Answered

Find Max for Every Category

Try this: A = [1 12; 1 16; 2 5; 2 13; 3 9; 3 19; 3 50]; Au = unique(A(:,1)); B = [Au accumarray(A(:,1), A(:,2), [], ...

Find Max for Every Category

Try this: A = [1 12; 1 16; 2 5; 2 13; 3 9; 3 19; 3 50]; Au = unique(A(:,1)); B = [Au accumarray(A(:,1), A(:,2), [], ...

7 days ago | 0

| accepted

Answered

How can I plot a hyperbola?

I do not understand the problem you are solving. Try this: f = @(x,y) 0.4829 - (sqrt((95-x).^2-(0-y).^2)-sqrt((0-x).^...

How can I plot a hyperbola?

I do not understand the problem you are solving. Try this: f = @(x,y) 0.4829 - (sqrt((95-x).^2-(0-y).^2)-sqrt((0-x).^...

7 days ago | 0

Answered

multiple boxplots in one figure

Try this: a = randn(1,31); b = randn(1,31)*2 + 2; c = randn(1,31)/2 + 3; figure(1) boxplot([a(:) b(:) c(:)...

multiple boxplots in one figure

Try this: a = randn(1,31); b = randn(1,31)*2 + 2; c = randn(1,31)/2 + 3; figure(1) boxplot([a(:) b(:) c(:)...

7 days ago | 0

Answered

Hello, if someone could please help. I was instructed to plot this data as a series of data points and not a solid line.

Include a marker argument to *|plot|*: plot(accel, '.'); although if *|‘t’|* and *|‘accel’|* are the same size, this wo...

Hello, if someone could please help. I was instructed to plot this data as a series of data points and not a solid line.

Include a marker argument to *|plot|*: plot(accel, '.'); although if *|‘t’|* and *|‘accel’|* are the same size, this wo...

8 days ago | 0

| accepted

Answered

How can i represent 2 functions on the same graph?

One option is the <https://www.mathworks.com/help/matlab/ref/fimplicit.html *|fimplicit|*> (link) function: f1 = @(x,y) 2*...

How can i represent 2 functions on the same graph?

One option is the <https://www.mathworks.com/help/matlab/ref/fimplicit.html *|fimplicit|*> (link) function: f1 = @(x,y) 2*...

8 days ago | 0

| accepted

Answered

Can we make the for loop a feedback loop that stops at a certain value?

For the range, an <https://www.mathworks.com/help/matlab/ref/if.html *|if|*> (link) block would work. To stop the loop, use...

Can we make the for loop a feedback loop that stops at a certain value?

For the range, an <https://www.mathworks.com/help/matlab/ref/if.html *|if|*> (link) block would work. To stop the loop, use...

8 days ago | 0

| accepted

Answered

Error in using fitlnm: Why do I get "The model function must accept two arguments"?

The function must express the model you are fitting in terms of a vector of parameters and the independent variable, with the pa...

Error in using fitlnm: Why do I get "The model function must accept two arguments"?

The function must express the model you are fitting in terms of a vector of parameters and the independent variable, with the pa...

8 days ago | 0

| accepted

Answered

output filter from bandpass function

The *|filter|* function will only return the same result as *|‘y’|* (or *|‘y1’|*) for linear-phase *|FIR|* filters such as those...

output filter from bandpass function

The *|filter|* function will only return the same result as *|‘y’|* (or *|‘y1’|*) for linear-phase *|FIR|* filters such as those...

8 days ago | 1

| accepted

Answered

How to create a horizontal histfit plot?

Try this: h = histfit(data); h(1).Horizontal = 'on'; Hy = h(2).XData; Hx = h(2).YData; h(2).Visible = 'off'; ...

How to create a horizontal histfit plot?

Try this: h = histfit(data); h(1).Horizontal = 'on'; Hy = h(2).XData; Hx = h(2).YData; h(2).Visible = 'off'; ...

8 days ago | 0

Answered

How to Correct the baseline shift of the signal

I always use discrete filters to eliminate baseline drift, baseline offset, and high-frequency noise. Try this: [D,S]...

How to Correct the baseline shift of the signal

I always use discrete filters to eliminate baseline drift, baseline offset, and high-frequency noise. Try this: [D,S]...

9 days ago | 0

| accepted

Answered

Cheb2ord bandpass order.

Other than purely real poles an zeros (that exist on the *|‘jw=0’|* or ‘real’ axis), poles and zeros exist as complex conjugate ...

Cheb2ord bandpass order.

Other than purely real poles an zeros (that exist on the *|‘jw=0’|* or ‘real’ axis), poles and zeros exist as complex conjugate ...

9 days ago | 0

Answered

Webcam cannot be disconnected

Try the function version: clear('camera') That is in the documentation as step *8* in: <https://www.mathworks.com/help/...

Webcam cannot be disconnected

Try the function version: clear('camera') That is in the documentation as step *8* in: <https://www.mathworks.com/help/...

9 days ago | 0

Answered

How to plot overlapping lines while esnuring both remain visible?

I would plot ‘pipe 3’ (or whatever one is plotted later) with a larger line width, or plot ‘pipe 2’ (if plotted first) as a soli...

How to plot overlapping lines while esnuring both remain visible?

I would plot ‘pipe 3’ (or whatever one is plotted later) with a larger line width, or plot ‘pipe 2’ (if plotted first) as a soli...

10 days ago | 0

| accepted