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

Input argument "x" is undefined.

Instead of using the single quotes, call the function in ode45 with a function handle as: [t,x]=ode45(@ckt,tspan,x0); so the ...

Input argument "x" is undefined.

Instead of using the single quotes, call the function in ode45 with a function handle as: [t,x]=ode45(@ckt,tspan,x0); so the ...

ungefär 3 timmar ago | 0

| accepted

Answered

Matlab graph not showing

Use element-wise division (./) instead of (/) and it works — s1=0.535*exp(1i*2*pi/3); s2=0.535*exp(1i*pi); s3=0.535*exp(1i*4*p...

Matlab graph not showing

Use element-wise division (./) instead of (/) and it works — s1=0.535*exp(1i*2*pi/3); s2=0.535*exp(1i*pi); s3=0.535*exp(1i*4*p...

ungefär 3 timmar ago | 0

| accepted

Answered

Who can help me with this please?

Note that ‘dy1’ ~= ‘dy’. Also, the function must follow the ode23 call to it, instead of appearing prior to it. [t,Y] = od...

Who can help me with this please?

Note that ‘dy1’ ~= ‘dy’. Also, the function must follow the ode23 call to it, instead of appearing prior to it. [t,Y] = od...

ungefär 9 timmar ago | 1

Answered

Step response with initial condition

To set the step amplitude to 10, try this: k=0.2; t2=400; s = tf('s'); u_del=(0.0022*k*(s+0.06931)*(s^2+0.4852*s+0.1492))/(...

Step response with initial condition

To set the step amplitude to 10, try this: k=0.2; t2=400; s = tf('s'); u_del=(0.0022*k*(s+0.06931)*(s^2+0.4852*s+0.1492))/(...

ungefär 12 timmar ago | 0

Answered

Plotting date (number) on x-axis

It is necessary to be creative with the plot and the tick labels. Try this: DL = load('april.mat'); ex1 = DL.ex1; Q1 = ex...

Plotting date (number) on x-axis

It is necessary to be creative with the plot and the tick labels. Try this: DL = load('april.mat'); ex1 = DL.ex1; Q1 = ex...

en dag ago | 0

| accepted

Answered

Error in using syms

Remove the single quotes, define ‘x’ as ‘x(t)’, and define ‘Dx’ (and ‘D2x’ if you want to), explicity: syms x(t) t s X F Dx ...

Error in using syms

Remove the single quotes, define ‘x’ as ‘x(t)’, and define ‘Dx’ (and ‘D2x’ if you want to), explicity: syms x(t) t s X F Dx ...

en dag ago | 1

| accepted

Answered

How can I delete rows with periodically in an excel file with matlab?

It depends on what the array is. To delete every other row (if ‘Array’ is your matrix): NewArray = Array(1:2:end,:); there...

How can I delete rows with periodically in an excel file with matlab?

It depends on what the array is. To delete every other row (if ‘Array’ is your matrix): NewArray = Array(1:2:end,:); there...

en dag ago | 0

Answered

using the vertical bars in calculation

I am not sure what you are asking. Perhaps the abs function?

using the vertical bars in calculation

I am not sure what you are asking. Perhaps the abs function?

2 dagar ago | 0

| accepted

Answered

How can I plot sequential data of a matrix

Try this: A = [0 329.62 0.01 329.61 0.014 329.60 0.2 329.59 0.00 329.63 0.05 329....

How can I plot sequential data of a matrix

Try this: A = [0 329.62 0.01 329.61 0.014 329.60 0.2 329.59 0.00 329.63 0.05 329....

2 dagar ago | 1

| accepted

Answered

No numeric data plot x axis

Try this: syms X L L = 16; Y = 1 + 2*X; figure fplot(Y, [0 L]); .

No numeric data plot x axis

Try this: syms X L L = 16; Y = 1 + 2*X; figure fplot(Y, [0 L]); .

2 dagar ago | 0

Answered

How can we fill a region defined by a implicit function?

I am not certain what you want. Try this: f=@(x,y) sin(x).*sin(y)-0.5; figure fp1=fimplicit(f,[-10,10,-10,10]); hold o...

How can we fill a region defined by a implicit function?

I am not certain what you want. Try this: f=@(x,y) sin(x).*sin(y)-0.5; figure fp1=fimplicit(f,[-10,10,-10,10]); hold o...

2 dagar ago | 0

| accepted

Answered

Keep y value below certain value in a loop

Try something like this: x = linspace(0, 5*pi, 250); Capacity = 0.7; limit_y = @(y,Capacity) (y<0).*0 + (y>Capacity).*Capaci...

Keep y value below certain value in a loop

Try something like this: x = linspace(0, 5*pi, 250); Capacity = 0.7; limit_y = @(y,Capacity) (y<0).*0 + (y>Capacity).*Capaci...

2 dagar ago | 0

Answered

Error converting from sym to double: Unable to convert expression into double array

Try this to create ‘T’ as a vector: n = 5 % Define ‘n’ syms T T = sym('T', [1 n]) produc...

Error converting from sym to double: Unable to convert expression into double array

Try this to create ‘T’ as a vector: n = 5 % Define ‘n’ syms T T = sym('T', [1 n]) produc...

2 dagar ago | 0

Answered

How to calculate the area between two curves separately based on being below or above.

Try something like this: t = linspace(0, 10*pi, 500); % Create Data y1 = exp(-0.1*t) .* si...

How to calculate the area between two curves separately based on being below or above.

Try something like this: t = linspace(0, 10*pi, 500); % Create Data y1 = exp(-0.1*t) .* si...

2 dagar ago | 0

| accepted

Answered

making matrix of matrices of specific inputs

Try this: for a = 1:numel(length_x11) % for b = 0:9 i11 = length_x11(a); j21 = length_y21(a); ...

making matrix of matrices of specific inputs

Try this: for a = 1:numel(length_x11) % for b = 0:9 i11 = length_x11(a); j21 = length_y21(a); ...

3 dagar ago | 0

| accepted

Answered

Filled 2D plot

My apologies for the delay. I was working on other things most of today. ‘However, to make the data more concise, I am try...

Filled 2D plot

My apologies for the delay. I was working on other things most of today. ‘However, to make the data more concise, I am try...

3 dagar ago | 0

| accepted

Answered

Unrecognized function or variable 'visadevlist'.

The visadevlist function requires the Instrument Control Toolbox.

Unrecognized function or variable 'visadevlist'.

The visadevlist function requires the Instrument Control Toolbox.

3 dagar ago | 0

| accepted

Answered

Multiple griddata calls into a single one (same grid)

The arrayfun function is significantly slower than an explicit loop, at least in my experience. I would just do something lik...

Multiple griddata calls into a single one (same grid)

The arrayfun function is significantly slower than an explicit loop, at least in my experience. I would just do something lik...

3 dagar ago | 0

Answered

Split Table data based on Day Names

Try this: C1 = readcell('Sample.csv'); [G,ID] = findgroups(C1(:,6)); % Idx = [4 2 6 7 5 1 3]; ...

Split Table data based on Day Names

Try this: C1 = readcell('Sample.csv'); [G,ID] = findgroups(C1(:,6)); % Idx = [4 2 6 7 5 1 3]; ...

3 dagar ago | 0

| accepted

Answered

How do I fit a Sinuscurve to my Data-Function, WITHOUT Cftool?

See if the approach in Curve fitting to a sinusoidal function will do what you want. It uses only core MATLAB functions, no to...

How do I fit a Sinuscurve to my Data-Function, WITHOUT Cftool?

See if the approach in Curve fitting to a sinusoidal function will do what you want. It uses only core MATLAB functions, no to...

4 dagar ago | 0

Answered

How do I plot fourier transform signals in Matlab

f = @ (t) exp(-abs(t)).*cos(20*t); figure fplot(f) for the Symbolic Math Toolbox, this becomes: syms t f(t) = exp(-abs(...

How do I plot fourier transform signals in Matlab

f = @ (t) exp(-abs(t)).*cos(20*t); figure fplot(f) for the Symbolic Math Toolbox, this becomes: syms t f(t) = exp(-abs(...

4 dagar ago | 0

| accepted

Answered

How to remove spurious lines?

Sort ‘velocity’: [velocity, idx] = sort(velocity); figure plot3(Freqs,velocity,filtered(idx)) ylim([-2 0]) xlim([2.5 15]...

How to remove spurious lines?

Sort ‘velocity’: [velocity, idx] = sort(velocity); figure plot3(Freqs,velocity,filtered(idx)) ylim([-2 0]) xlim([2.5 15]...

4 dagar ago | 0

| accepted

Answered

Unknown variable complex equation

I ahve no idea what ‘Cp’ does here. Otherwise: gamma = 1.4; prat = @(Me,gamma) ((1+(gamma-1)/2.*Me.^2).^(gamma/(gamma-1)))...

Unknown variable complex equation

I ahve no idea what ‘Cp’ does here. Otherwise: gamma = 1.4; prat = @(Me,gamma) ((1+(gamma-1)/2.*Me.^2).^(gamma/(gamma-1)))...

4 dagar ago | 0

| accepted

Answered

solve equation : Empty sym: 0-by-1

The Symbolic Math Toolbox may not be appropriate for this problem. Try this: freq = linspace(10*1e3, 31*1e6,100); w = 2*pi...

solve equation : Empty sym: 0-by-1

The Symbolic Math Toolbox may not be appropriate for this problem. Try this: freq = linspace(10*1e3, 31*1e6,100); w = 2*pi...

4 dagar ago | 0

Answered

plotting 2 variables as they change with respect to one another

The solution is to subscript ‘A’. Try this: gamma = 1.4; %M=1.53 Mv = (0.1:0.01:2.19); for k1 = 1:numel(Mv) M = Mv(...

plotting 2 variables as they change with respect to one another

The solution is to subscript ‘A’. Try this: gamma = 1.4; %M=1.53 Mv = (0.1:0.01:2.19); for k1 = 1:numel(Mv) M = Mv(...

4 dagar ago | 0

Answered

Divide matrix in subgroups

The mat2cell function will likely do what you want. Note that assigning each matrix to a different variable is not advisable....

Divide matrix in subgroups

The mat2cell function will likely do what you want. Note that assigning each matrix to a different variable is not advisable....

5 dagar ago | 0

| accepted

Answered

Suggestions for financial simulation

That is an interesting problem! Use your favourite seach engine (I prefer DuckDuckGo) and search on: financial simulations usin...

Suggestions for financial simulation

That is an interesting problem! Use your favourite seach engine (I prefer DuckDuckGo) and search on: financial simulations usin...

5 dagar ago | 0

Answered

How do I extract the amplitude and the frequency from a sine function?

Use the fft function. Calculated, interpreted, and plotted correctly, it will give all that information.

How do I extract the amplitude and the frequency from a sine function?

Use the fft function. Calculated, interpreted, and plotted correctly, it will give all that information.

5 dagar ago | 0

Answered

Returning to a function and changing variables if ans is false?

I would do something like this, and treat it as an optimization (specifically root-finding) problem, returning the value of ‘dRo...

Returning to a function and changing variables if ans is false?

I would do something like this, and treat it as an optimization (specifically root-finding) problem, returning the value of ‘dRo...

5 dagar ago | 0

Answered

How to reduce the size of a graph to see the title and a legend that are not displayed?

Try something like this: figure plot( ... ) title( ... ) legend( ... ) pos = get(gcf, 'Position') set(gcf, 'Position',pos...

How to reduce the size of a graph to see the title and a legend that are not displayed?

Try something like this: figure plot( ... ) title( ... ) legend( ... ) pos = get(gcf, 'Position') set(gcf, 'Position',pos...

5 dagar ago | 0