11,228 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

Labelling peaks on a graph

Use the findpeaks (link) or islocalmax (link) function, and the text (link) function.

Labelling peaks on a graph

Use the findpeaks (link) or islocalmax (link) function, and the text (link) function.

3 hours ago | 0

Answered

Surface plot form 1d data

We have absolutely no idea what result you are expecting. Try this: %% 1D line plot x = linspace(0,1000,1000); C = @(...

Surface plot form 1d data

We have absolutely no idea what result you are expecting. Try this: %% 1D line plot x = linspace(0,1000,1000); C = @(...

18 hours ago | 0

Answered

Ignore text in a txt file

It depends on the function you are using to read them. In the textscan (link) and other functions that use textscan, they are ...

Ignore text in a txt file

It depends on the function you are using to read them. In the textscan (link) and other functions that use textscan, they are ...

19 hours ago | 0

Answered

Having trouble solving system of equations

Use the correct syntax for solve, and use the vpa function to get numeric results: syms c1 c2 [C1,C2] = solve(c1==18*c1-1200+...

Having trouble solving system of equations

Use the correct syntax for solve, and use the vpa function to get numeric results: syms c1 c2 [C1,C2] = solve(c1==18*c1-1200+...

20 hours ago | 0

Answered

help with ode solvers non-linear ode 1st law of thermodynamics

I let the Symbolic Math Toolbox have its way with your equations: syms w Ao q Ap Pa k L g t y(t) P(t) m(t) V c Y Dy = diff(y...

help with ode solvers non-linear ode 1st law of thermodynamics

I let the Symbolic Math Toolbox have its way with your equations: syms w Ao q Ap Pa k L g t y(t) P(t) m(t) V c Y Dy = diff(y...

20 hours ago | 0

Answered

How to peform multiple paired-t tests

You need to be very careful doing multiple comparisons. See the documentation for this multcompare (link) function (there are t...

How to peform multiple paired-t tests

You need to be very careful doing multiple comparisons. See the documentation for this multcompare (link) function (there are t...

22 hours ago | 1

| accepted

Answered

Displaying for loop iterations as a matrix

I am guessing here: Rv=0.6:0.05:0.95; for k1 = 1:numel(Rv) R = Rv(k1); A=[(1.5*R-1.59), 0.5*R, 0; 0.5, -21.75, 0; 0...

Displaying for loop iterations as a matrix

I am guessing here: Rv=0.6:0.05:0.95; for k1 = 1:numel(Rv) R = Rv(k1); A=[(1.5*R-1.59), 0.5*R, 0; 0.5, -21.75, 0; 0...

23 hours ago | 0

Answered

Can't run an equation in a function that works in a script

Try this: function [y] = test(x) c1 = 0.5176; c2 = 116; c3 = 0.4; c4 = 5; c5 = 21; c6 = 0.0068; % equation 1 lamdai1 z...

Can't run an equation in a function that works in a script

Try this: function [y] = test(x) c1 = 0.5176; c2 = 116; c3 = 0.4; c4 = 5; c5 = 21; c6 = 0.0068; % equation 1 lamdai1 z...

23 hours ago | 0

Answered

What is the solution for below code? It shows error

I suspect the error refers to this assignment: [,F,T,P]= spectrogram(y,NW,[],[],fs); (that also seems to be missing an output...

What is the solution for below code? It shows error

I suspect the error refers to this assignment: [,F,T,P]= spectrogram(y,NW,[],[],fs); (that also seems to be missing an output...

1 day ago | 0

Answered

3D plotting in Matlab

If you are plotting vectors, use the plot3 (link) function. Other possibilities are scatter3 (linked to in the plot3 page), and...

3D plotting in Matlab

If you are plotting vectors, use the plot3 (link) function. Other possibilities are scatter3 (linked to in the plot3 page), and...

1 day ago | 0

| accepted

Answered

Update Matlab's font list

There are a few font utilities in MATLAB. See the documentation on the listfonts (link) function, and links to related function...

Update Matlab's font list

There are a few font utilities in MATLAB. See the documentation on the listfonts (link) function, and links to related function...

1 day ago | 0

Answered

Integration is not evaluated inside a function file

In the MATLAB Symbolic Math Toolbox, the correct syntax for your int call would be: q1 = int(FF,b,0,a1) However, I do not und...

Integration is not evaluated inside a function file

In the MATLAB Symbolic Math Toolbox, the correct syntax for your int call would be: q1 = int(FF,b,0,a1) However, I do not und...

1 day ago | 1

| accepted

Answered

Why am I not getting an array of answers from this operation?

Because you coded it with incorrect syntax. Try this: t=linspace(0,3.5,1000); u=4*exp(-0.45*t).*sin(4*t + 0.5); figure ...

Why am I not getting an array of answers from this operation?

Because you coded it with incorrect syntax. Try this: t=linspace(0,3.5,1000); u=4*exp(-0.45*t).*sin(4*t + 0.5); figure ...

2 days ago | 0

Answered

Plotting 1402 data points for a voltammogram

‘... when i try 'plot(x,y)' it says I have too many input arguments ..’ You probably have a variable (or your own function) t...

Plotting 1402 data points for a voltammogram

‘... when i try 'plot(x,y)' it says I have too many input arguments ..’ You probably have a variable (or your own function) t...

2 days ago | 0

Answered

How to add header to a table?

Use the 'VariableNames' (link) name-value pair with your ‘header’ cell array.

How to add header to a table?

Use the 'VariableNames' (link) name-value pair with your ‘header’ cell array.

2 days ago | 0

| accepted

Answered

Assignment has more non-singleton rhs dimensions than non-singleton subscripts

Your ‘x(i,i)’ references a single scalar value. To assign the result to a column of ‘x’, do this: x(:,i) = xl+(xu - xl).*rand...

Assignment has more non-singleton rhs dimensions than non-singleton subscripts

Your ‘x(i,i)’ references a single scalar value. To assign the result to a column of ‘x’, do this: x(:,i) = xl+(xu - xl).*rand...

2 days ago | 1

| accepted

Answered

Outputting solutions to symbolic variables in a matrix.

Assuming the vector elements are not functions of symbolic variables (i.e. are purely numeric) see if using the double (link) fu...

Outputting solutions to symbolic variables in a matrix.

Assuming the vector elements are not functions of symbolic variables (i.e. are purely numeric) see if using the double (link) fu...

2 days ago | 0

Answered

How can I stretch a line of best fit to the limits of my axes?

You simply need to concatenate a ‘0’ to ‘xrefract’ in the polyval and plot calls: lobf = polyval(poly,[0, xrefract]) and: p...

How can I stretch a line of best fit to the limits of my axes?

You simply need to concatenate a ‘0’ to ‘xrefract’ in the polyval and plot calls: lobf = polyval(poly,[0, xrefract]) and: p...

2 days ago | 0

| accepted

Answered

Find all points of intersection between two functions

There are only 2 real intersection points. To find them, you simply need to find out the x-values where the functions equal eac...

Find all points of intersection between two functions

There are only 2 real intersection points. To find them, you simply need to find out the x-values where the functions equal eac...

3 days ago | 0

Answered

Creating a linear plot over a plot of giving numbers

Try this: plot (x1,y1,'p') hold on plot([0 20], 3+0.5*[0 20]) hold off It’s a linear function, so you only need the limits...

Creating a linear plot over a plot of giving numbers

Try this: plot (x1,y1,'p') hold on plot([0 20], 3+0.5*[0 20]) hold off It’s a linear function, so you only need the limits...

3 days ago | 0

Answered

how to solve laplace transform problem in matlab

We do not know what you did to solve this. (Always post what you’ve already attempted.) However, if you got frustrated, that i...

how to solve laplace transform problem in matlab

We do not know what you did to solve this. (Always post what you’ve already attempted.) However, if you got frustrated, that i...

3 days ago | 0

Answered

Writeing a stings using Matlab 2015

The standard output (The Command Window) has a file identification number = 1. So: fprintf(fid, 'Hello\nWorld\n') will pr...

Writeing a stings using Matlab 2015

The standard output (The Command Window) has a file identification number = 1. So: fprintf(fid, 'Hello\nWorld\n') will pr...

3 days ago | 0

| accepted

Answered

Step Fucntion in Matlab

Since the unit step functrion is defined as being equal to 1 for , I would use: Ustp0 = @(t) (t >= 0); Ustp1 = @(t) 0.5*(t =...

Step Fucntion in Matlab

Since the unit step functrion is defined as being equal to 1 for , I would use: Ustp0 = @(t) (t >= 0); Ustp1 = @(t) 0.5*(t =...

3 days ago | 0

| accepted

Answered

How can I subs 2 symbolic vectors in 1 comand?

You defined ‘Z’ to require 4 different arguments, so the substitution has to match them, either using subs or using ‘Z’ as a fun...

How can I subs 2 symbolic vectors in 1 comand?

You defined ‘Z’ to require 4 different arguments, so the substitution has to match them, either using subs or using ‘Z’ as a fun...

3 days ago | 0

| accepted

Answered

Bathymetric data into a surface plot

Try this: [D,S] = xlsread('Bathymetric data (XYZ).xlsx'); Lon = D(:,1); Lat = D(:,2); Dep = D(:,3); figure plot3(Lon, L...

Bathymetric data into a surface plot

Try this: [D,S] = xlsread('Bathymetric data (XYZ).xlsx'); Lon = D(:,1); Lat = D(:,2); Dep = D(:,3); figure plot3(Lon, L...

3 days ago | 0

| accepted

Answered

When I run the program inaccurate results appear What is the problem?

The best approach to this is likely not the vpasolve function, since it takes forever. I have no idea of these are the ‘accur...

When I run the program inaccurate results appear What is the problem?

The best approach to this is likely not the vpasolve function, since it takes forever. I have no idea of these are the ‘accur...

3 days ago | 0

| accepted

Answered

About MATLAB R2018B update

I installed the R2018b Update3 yesterday and when I checked just now, it said that I was running the latest update. I suggest...

About MATLAB R2018B update

I installed the R2018b Update3 yesterday and when I checked just now, it said that I was running the latest update. I suggest...

3 days ago | 0

Answered

How I can Plots this function

Another approach: x = @(t) 3*exp(-2*t) .* (t >= 0); t = linspace(-10,10); figure plot(t, x(t))

How I can Plots this function

Another approach: x = @(t) 3*exp(-2*t) .* (t >= 0); t = linspace(-10,10); figure plot(t, x(t))

3 days ago | 0

Answered

How to keep a patch object and its rotation in the same plot

Try this: x = [1 2 2 1]; y = [1 1 2 2]; figure bot = patch(x,y,'blue'); rotate(bot, [0 0 1], 45) hold on patch(x,y,'bl...

How to keep a patch object and its rotation in the same plot

Try this: x = [1 2 2 1]; y = [1 1 2 2]; figure bot = patch(x,y,'blue'); rotate(bot, [0 0 1], 45) hold on patch(x,y,'bl...

4 days ago | 0

| accepted