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

change timetable variable (working day to holiday)

Try this: dd = datetime(2016,01,01):days(1):datetime(2016,12,31); % Create ‘datetime’ Array workday = ones(si...

change timetable variable (working day to holiday)

Try this: dd = datetime(2016,01,01):days(1):datetime(2016,12,31); % Create ‘datetime’ Array workday = ones(si...

circa 3 ore ago | 0

Answered

Multiple plots in a single X and y axis

Use the hold function. Example — x = linspace(1, 2, 250); y1 = sin(2*pi*x*5); y2 = cos(2*pi*x*7); figure plot(x, y1) ...

Multiple plots in a single X and y axis

Use the hold function. Example — x = linspace(1, 2, 250); y1 = sin(2*pi*x*5); y2 = cos(2*pi*x*7); figure plot(x, y1) ...

circa 10 ore ago | 0

Answered

How to solve a system of 4 ODEs?

Try this: syms Sh(t) Ih(t) Sm(t) Im(t) Sh0 Ih0 Sm0 Im0 T Y betah = 1000; betam = 300; gammah = 0.004; gammam = 0.06; muh ...

How to solve a system of 4 ODEs?

Try this: syms Sh(t) Ih(t) Sm(t) Im(t) Sh0 Ih0 Sm0 Im0 T Y betah = 1000; betam = 300; gammah = 0.004; gammam = 0.06; muh ...

circa 10 ore ago | 0

Answered

Solve (a*B) + (c*D) = E without the Symbolic Toolbox

This would seem to be homework, and for homework we only give guidance and hints. I would set it up as an implicit equation (...

Solve (a*B) + (c*D) = E without the Symbolic Toolbox

This would seem to be homework, and for homework we only give guidance and hints. I would set it up as an implicit equation (...

circa 19 ore ago | 0

Answered

how o count he number of occurences of a string in an external text file?

The function you want is probably fgetl (or related functions) rather than char. Then try: s = fgetl(fid); There are likel...

how o count he number of occurences of a string in an external text file?

The function you want is probably fgetl (or related functions) rather than char. Then try: s = fgetl(fid); There are likel...

circa 20 ore ago | 0

Answered

For Loop to calculate prob of pair of values occuring

Using the unique function with the 'rows' option may help. If you want to include a tolerance if the elements are °close enou...

For Loop to calculate prob of pair of values occuring

Using the unique function with the 'rows' option may help. If you want to include a tolerance if the elements are °close enou...

circa 23 ore ago | 0

Answered

Searching for a line of characters from a text file

It might be easier to use the fileread function to read the entire file in as text, then use strfind to locate the strings you w...

Searching for a line of characters from a text file

It might be easier to use the fileread function to read the entire file in as text, then use strfind to locate the strings you w...

circa 23 ore ago | 0

Answered

ERROR: Not enough input arguments.

That error could be thrown if ‘obsData’ is a variable that should be passed to your ‘CalcMKJointProb’ function as an argument, a...

ERROR: Not enough input arguments.

That error could be thrown if ‘obsData’ is a variable that should be passed to your ‘CalcMKJointProb’ function as an argument, a...

1 giorno ago | 1

| accepted

Answered

Need to make a 4D plot(3D + Colour)

The simplest option is likely the scatter3 function. plot it as: figure scatter3(x, y, z, [], t, 'filled') grid on axis e...

Need to make a 4D plot(3D + Colour)

The simplest option is likely the scatter3 function. plot it as: figure scatter3(x, y, z, [], t, 'filled') grid on axis e...

1 giorno ago | 0

Answered

Curve fitting for coupled monod equation

There are several options. Two are linked to here. One option: Parameter Estimation for a System of Differential Equations u...

Curve fitting for coupled monod equation

There are several options. Two are linked to here. One option: Parameter Estimation for a System of Differential Equations u...

1 giorno ago | 0

Answered

Error when using step-command

I strongly suspect that you have a variable named ‘step’. Run this is a script or your Command Window: which step -all I s...

Error when using step-command

I strongly suspect that you have a variable named ‘step’. Run this is a script or your Command Window: which step -all I s...

1 giorno ago | 1

| accepted

Answered

How to solve this equation on MATLAB ? how to get the value of x

Running vpasolve two times reveals two solutions: syms x f = ((30\((0.45+0.1233*x).*(12+0.2958*x)))-(2.41*((0.57-0.11789*x)....

How to solve this equation on MATLAB ? how to get the value of x

Running vpasolve two times reveals two solutions: syms x f = ((30\((0.45+0.1233*x).*(12+0.2958*x)))-(2.41*((0.57-0.11789*x)....

1 giorno ago | 0

Answered

Lotka Volterra with an additional parameter

I cannot imagine how you got that code to work at all, considering that the function you call in ode45 is not the function you p...

Lotka Volterra with an additional parameter

I cannot imagine how you got that code to work at all, considering that the function you call in ode45 is not the function you p...

1 giorno ago | 0

| accepted

Answered

Plotting the Complex spectrum of a converted signal

Whatever ’P’ is, is missing, however that is of no consequence. Use the fplot function to do the plotting: figure fplot(re...

Plotting the Complex spectrum of a converted signal

Whatever ’P’ is, is missing, however that is of no consequence. Use the fplot function to do the plotting: figure fplot(re...

1 giorno ago | 1

Answered

Statistical Analyses Across Structures

I am not certain what you want to do. For the boxplot, try this: D = load('structure.mat'); S = D.S; for k1 = 1:numel(S) ...

Statistical Analyses Across Structures

I am not certain what you want to do. For the boxplot, try this: D = load('structure.mat'); S = D.S; for k1 = 1:numel(S) ...

2 giorni ago | 0

Answered

Get rid of array strings from readtable

Try this: Precision = [{'91,6'}; {'91,1'}; {'90,4'}]; % Create Vector T1 = table(Precision); ...

Get rid of array strings from readtable

Try this: Precision = [{'91,6'}; {'91,1'}; {'90,4'}]; % Create Vector T1 = table(Precision); ...

2 giorni ago | 0

Answered

plot a marker in the center of the circle?

Add this after the fill call: plot(x, y, 'kp', 'MarkerSize',15, 'MarkerFaceColor','k') Also consider separate arguments for t...

plot a marker in the center of the circle?

Add this after the fill call: plot(x, y, 'kp', 'MarkerSize',15, 'MarkerFaceColor','k') Also consider separate arguments for t...

2 giorni ago | 0

| accepted

Answered

To associate a routine to only one PC

For Windows systems, one option could be to do what MathWorks does, and use the ‘C:\’ volume sedrial number: [s,cmdout] = syst...

To associate a routine to only one PC

For Windows systems, one option could be to do what MathWorks does, and use the ‘C:\’ volume sedrial number: [s,cmdout] = syst...

2 giorni ago | 0

Answered

will there be any effect on the result while multiplying two signals with the same time range but different sampling rate?

They have to have the same numbers of elements, or the element-wise multiplication will throw an error. You can multiply one as...

will there be any effect on the result while multiplying two signals with the same time range but different sampling rate?

They have to have the same numbers of elements, or the element-wise multiplication will throw an error. You can multiply one as...

2 giorni ago | 0

Answered

Multiple functions working together?

MATLAB is interpreting: d(3) as indexing into the third element of ‘d’. Run: which d -all from a script or your Command...

Multiple functions working together?

MATLAB is interpreting: d(3) as indexing into the third element of ‘d’. Run: which d -all from a script or your Command...

2 giorni ago | 1

| accepted

Answered

Log axis with percentage tick labels

I am not certain what you want to do. Try this: x = linspace(-2, 2, 50); % Create Data y = exp(...

Log axis with percentage tick labels

I am not certain what you want to do. Try this: x = linspace(-2, 2, 50); % Create Data y = exp(...

2 giorni ago | 0

| accepted

Answered

Help creating a basic function

It is likely easiest to define a third variable, then set that equal to what you want: function [n] = n(x,y) z = x+y+1; syms...

Help creating a basic function

It is likely easiest to define a third variable, then set that equal to what you want: function [n] = n(x,y) z = x+y+1; syms...

2 giorni ago | 0

Answered

Genetic Algorithm Calculation steps

The ga function essentially takes a population of possible parameter vectors and ‘evolves’ them so that the set that produces th...

Genetic Algorithm Calculation steps

The ga function essentially takes a population of possible parameter vectors and ‘evolves’ them so that the set that produces th...

2 giorni ago | 0

Answered

how to read big signal data

If you have R2020b, see the documentation section on Large Files and Big Data. These appear to have been introduced in R2016b. ...

how to read big signal data

If you have R2020b, see the documentation section on Large Files and Big Data. These appear to have been introduced in R2016b. ...

2 giorni ago | 0

Answered

How to use regexp to extract data?

Try this: tdata = {'XX__TG','GB_TH','BN__TH'}'; Out = regexp(tdata, '__|_','split') with: Out{1} Out{2} Out{3} producin...

How to use regexp to extract data?

Try this: tdata = {'XX__TG','GB_TH','BN__TH'}'; Out = regexp(tdata, '__|_','split') with: Out{1} Out{2} Out{3} producin...

3 giorni ago | 0

Answered

Integral with specific range (i.e t = 0:0.1:1)

Do the integration in a loop for each value of ‘t’: function lc = intensityc(t) B = 2; ac = 0.4; lc = (B/ac)*((...

Integral with specific range (i.e t = 0:0.1:1)

Do the integration in a loop for each value of ‘t’: function lc = intensityc(t) B = 2; ac = 0.4; lc = (B/ac)*((...

3 giorni ago | 0

Answered

Solving using ODE45

I am not certain what you are doing. One problem is that you would have to iterate over ‘n’ with a loop, because otherwise t...

Solving using ODE45

I am not certain what you are doing. One problem is that you would have to iterate over ‘n’ with a loop, because otherwise t...

3 giorni ago | 0

Answered

The input command problem

Yes! Although for a string input, use the 's' option: A=input('please insert your name','s') For what it’s worth, I prefer...

The input command problem

Yes! Although for a string input, use the 's' option: A=input('please insert your name','s') For what it’s worth, I prefer...

3 giorni ago | 0

Answered

Loglog plot not plotting anything

The logspace call is wrong. If you want ‘f’ to go from 10 to , call it as: f = logspace(1, 9, 50); That creates a 50-eleme...

Loglog plot not plotting anything

The logspace call is wrong. If you want ‘f’ to go from 10 to , call it as: f = logspace(1, 9, 50); That creates a 50-eleme...

3 giorni ago | 0

Answered

odearguments error for fitting data with system of ODEs

The ‘dydt’ definition should be: dydt = [0; 0]; that would define a column vector. The differential equation runs correctrly...

odearguments error for fitting data with system of ODEs

The ‘dydt’ definition should be: dydt = [0; 0]; that would define a column vector. The differential equation runs correctrly...

3 giorni ago | 0