12.732 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

Grouping data in a matrx

You can plot them the way you want without grouping them. However groutping them is straightforward. One approach: time = ...

Grouping data in a matrx

You can plot them the way you want without grouping them. However groutping them is straightforward. One approach: time = ...

alrededor de 1 hora ago | 0

Answered

Failure in initial objective function evaluation. FSOLVE cannot continue.

The ‘Y’ evaluation is missing a few multiplication(?) operators, and needs to do element-wise operations elsewhere: Y = B-((Q1...

Failure in initial objective function evaluation. FSOLVE cannot continue.

The ‘Y’ evaluation is missing a few multiplication(?) operators, and needs to do element-wise operations elsewhere: Y = B-((Q1...

alrededor de 2 horas ago | 0

Answered

Question on how to use scatter3

The ‘Z’ vector can be anything, providing it is a vector of the same size as the others. Setting it equal to: Z = zeros(size(...

Question on how to use scatter3

The ‘Z’ vector can be anything, providing it is a vector of the same size as the others. Setting it equal to: Z = zeros(size(...

alrededor de 2 horas ago | 0

| accepted

Answered

How can I create a plot for 2 different groups?

I have no idea what you want. Two possibilities (both requiring the Statistics and Machine Learning Toolbox): gscatter and gp...

How can I create a plot for 2 different groups?

I have no idea what you want. Two possibilities (both requiring the Statistics and Machine Learning Toolbox): gscatter and gp...

alrededor de 4 horas ago | 0

Answered

How do I plot these for loops?

Put them all in subplots, with the appropriate indexing: tspan = linspace(0, 5, 25); for k=1:5 y0 = 0; [t,y(:,k)] = ode45(@...

How do I plot these for loops?

Put them all in subplots, with the appropriate indexing: tspan = linspace(0, 5, 25); for k=1:5 y0 = 0; [t,y(:,k)] = ode45(@...

alrededor de 13 horas ago | 0

| accepted

Answered

Other alternative than syms for differentiation and integration?

MATLAB is case-sensitive, so X ~= x. Try this: syms x; fun = x^3+2*x+10; dfundx = diff (fun,x); producing: dfundx = 3...

Other alternative than syms for differentiation and integration?

MATLAB is case-sensitive, so X ~= x. Try this: syms x; fun = x^3+2*x+10; dfundx = diff (fun,x); producing: dfundx = 3...

alrededor de 15 horas ago | 0

Answered

Solving non linear equations sytem

The Symbolic Math Toolbox is not optimal for such problems. It is likely not worth the effort to see if a symbolic solution exi...

Solving non linear equations sytem

The Symbolic Math Toolbox is not optimal for such problems. It is likely not worth the effort to see if a symbolic solution exi...

alrededor de 23 horas ago | 2

Answered

undefined variable error when the variable is there

Please note that: l ~= 1 You typed: for i = l:length(t) for j = l:length(x) however I believe you intended: for i =...

undefined variable error when the variable is there

Please note that: l ~= 1 You typed: for i = l:length(t) for j = l:length(x) however I believe you intended: for i =...

1 día ago | 0

| accepted

Answered

t(j) is coming up as an error when trying to graph values. what am i doing wrong

It doesn’t appear that you have defined ‘j’ anywhere before the loop. One possibility: iv = 0:0.1:t1; for j = 1:numel(iv) ...

t(j) is coming up as an error when trying to graph values. what am i doing wrong

It doesn’t appear that you have defined ‘j’ anywhere before the loop. One possibility: iv = 0:0.1:t1; for j = 1:numel(iv) ...

2 días ago | 0

| accepted

Answered

Loop Trough Time t = t+dt

You have encountered floating-point approximation error. See the documentation section on Floating-Point Numbers, and the col...

Loop Trough Time t = t+dt

You have encountered floating-point approximation error. See the documentation section on Floating-Point Numbers, and the col...

2 días ago | 2

Answered

find(vector==value) not working

You have encountered floating-point approximation error. See the documentation on Floating-Point Numbers for a full explanation...

find(vector==value) not working

You have encountered floating-point approximation error. See the documentation on Floating-Point Numbers for a full explanation...

2 días ago | 1

| accepted

Answered

Variable inside an ode

Try this: SA = @(t) 0.00155+(0.06043-0.0015)./(1+(t/4481.23119).^0.85949); f = @(t,Cb) SA(t)*D/(h*DV)*(Cs-Cb) The rest of yo...

Variable inside an ode

Try this: SA = @(t) 0.00155+(0.06043-0.0015)./(1+(t/4481.23119).^0.85949); f = @(t,Cb) SA(t)*D/(h*DV)*(Cs-Cb) The rest of yo...

2 días ago | 0

| accepted

Answered

Linear best fit through specified y-axis intercept

Try this: x = linspace(0.7, 1.7, 5); % Create Data (Use Your Own ‘x’ & ‘y’) y = randn(1,5); ...

Linear best fit through specified y-axis intercept

Try this: x = linspace(0.7, 1.7, 5); % Create Data (Use Your Own ‘x’ & ‘y’) y = randn(1,5); ...

2 días ago | 0

Answered

How can I smooth this plot?

Try this: [D,S] = xlsread('Book1.xlsx'); signal = D(:,1); L = size(signal,1); Fs = 1; ...

How can I smooth this plot?

Try this: [D,S] = xlsread('Book1.xlsx'); signal = D(:,1); L = size(signal,1); Fs = 1; ...

2 días ago | 0

| accepted

Answered

Warning: The closed-loop system is unstable.

The system has a pole-zero cancellation at the origin: s = tf('s'); ctf = (10*s^3 + 1100*s^2 + 10000*s) / (s^4 + 210*s^3 + ...

Warning: The closed-loop system is unstable.

The system has a pole-zero cancellation at the origin: s = tf('s'); ctf = (10*s^3 + 1100*s^2 + 10000*s) / (s^4 + 210*s^3 + ...

3 días ago | 0

Answered

Lines in legend are missing

This appears to be a problem with current AMD graphics card drivers. The easiest solution seems to be: opengl('software') ...

Lines in legend are missing

This appears to be a problem with current AMD graphics card drivers. The easiest solution seems to be: opengl('software') ...

3 días ago | 0

| accepted

Answered

How to fit data on only one ordinary differential equations (out of multiple equations) with multiple unknown parameters

The lsqcurvefit function allows you to set upper and lower bounds on the parameters it estimates with the ‘lb’ and ‘ub’ vectors....

How to fit data on only one ordinary differential equations (out of multiple equations) with multiple unknown parameters

The lsqcurvefit function allows you to set upper and lower bounds on the parameters it estimates with the ‘lb’ and ‘ub’ vectors....

3 días ago | 0

| accepted

Answered

Weighted fit with lsqcurvefit and (ideally) multistart?

I doubt that weighting is appropriate, and I would not recommend doing that. I recognise that code excerpt, so I am attaching...

Weighted fit with lsqcurvefit and (ideally) multistart?

I doubt that weighting is appropriate, and I would not recommend doing that. I recognise that code excerpt, so I am attaching...

3 días ago | 0

Answered

Why isn't my graph plotting correctly?

Set the peaks values to NaN and they will not plot: km=linspace(0,10,1000); y=tan(km)+tanh(km); [pks,locs] = findpeaks(y); ...

Why isn't my graph plotting correctly?

Set the peaks values to NaN and they will not plot: km=linspace(0,10,1000); y=tan(km)+tanh(km); [pks,locs] = findpeaks(y); ...

3 días ago | 0

Answered

Contour plot using three vectors

I thought we already solved that in Contour plot of concentration of chemical species ? Apparently I did not explain this s...

Contour plot using three vectors

I thought we already solved that in Contour plot of concentration of chemical species ? Apparently I did not explain this s...

3 días ago | 1

Answered

use of signtest function

From the documentation: [p,h] = signtest(___) also returns a logical value indicating the test decision. The value h = 1...

use of signtest function

From the documentation: [p,h] = signtest(___) also returns a logical value indicating the test decision. The value h = 1...

3 días ago | 0

| accepted

Answered

Interpolate a set of points

I am not certain what you want. The figure produced by this code appears quite similar to your original plot image: D = rea...

Interpolate a set of points

I am not certain what you want. The figure produced by this code appears quite similar to your original plot image: D = rea...

3 días ago | 0

| accepted

Answered

how do I plot temperature contours on a PV diagram?

Try this example — Tv1 = linspace(273, 323, 10); Tv2 = linspace(323, 373, 10); Vv1 = linspace(150, 200, 10); [T1m,V1m] = nd...

how do I plot temperature contours on a PV diagram?

Try this example — Tv1 = linspace(273, 323, 10); Tv2 = linspace(323, 373, 10); Vv1 = linspace(150, 200, 10); [T1m,V1m] = nd...

4 días ago | 0

Answered

I am trying to plot a function with iteration of a variable

Try this: a = .0022; %m d = .05*a; %m viscosity_p = 1.2; %cP viscosity_c = 3.5; %cP dpdz1 = -10; %mmHg dpdz2 = -1.3; %kPa...

I am trying to plot a function with iteration of a variable

Try this: a = .0022; %m d = .05*a; %m viscosity_p = 1.2; %cP viscosity_c = 3.5; %cP dpdz1 = -10; %mmHg dpdz2 = -1.3; %kPa...

4 días ago | 0

Answered

Intersection between ellipse and circle

Try this: %ellipse e=0.284576477148; %eccentricity a=0.803468308684*150*10^6; c=e*a; b=sqrt(a^2-c^2); %parameters of ellipse...

Intersection between ellipse and circle

Try this: %ellipse e=0.284576477148; %eccentricity a=0.803468308684*150*10^6; c=e*a; b=sqrt(a^2-c^2); %parameters of ellipse...

4 días ago | 1

| accepted

Answered

Shortcuts for symbols not recognized

It depends on how and where you want to use them. To use them in plots, use the text function, and particularly see the section...

Shortcuts for symbols not recognized

It depends on how and where you want to use them. To use them in plots, use the text function, and particularly see the section...

4 días ago | 0

Answered

lsqcurvefit: is the output of this function unique for a given set of initial conditions (and deterministic model)?

All nonlinear parameter estimation algorithms are sensitive to the initial parameter estimates. It is quite possible that they ...

lsqcurvefit: is the output of this function unique for a given set of initial conditions (and deterministic model)?

All nonlinear parameter estimation algorithms are sensitive to the initial parameter estimates. It is quite possible that they ...

4 días ago | 0

Answered

Plot a straight line on another graph

It looks as though you want to plot tangent lines at specific points on the curve. See How to draw tangent line at infleciton p...

Plot a straight line on another graph

It looks as though you want to plot tangent lines at specific points on the curve. See How to draw tangent line at infleciton p...

4 días ago | 0

| accepted

Answered

how to plot this equation?

Try this: t = linspace(0, 5000, 250); % Choose Appropriate Limits y = 10.1556-9.10862*exp(-0.0010...

how to plot this equation?

Try this: t = linspace(0, 5000, 250); % Choose Appropriate Limits y = 10.1556-9.10862*exp(-0.0010...

5 días ago | 0

Answered

Printing a variable within an input command

Assuming ‘current_player’ is a character array or string variable: move = input(sprintf('Player %s, choose column 1-7 to drop ...

Printing a variable within an input command

Assuming ‘current_player’ is a character array or string variable: move = input(sprintf('Player %s, choose column 1-7 to drop ...

5 días ago | 0