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

Unable To Find Explicit Solution [Empty Syms]

There is no function called ‘T’ so ‘T(0)’ is not defined. Try this instead — syms I(t) Mu To t %Used to decalre variables a...

Unable To Find Explicit Solution [Empty Syms]

There is no function called ‘T’ so ‘T(0)’ is not defined. Try this instead — syms I(t) Mu To t %Used to decalre variables a...

2 hours ago | 0

Answered

Merging overlapping circles and remove the union part

One approach — t = linspace(0,2*pi,500); % Allow Adequate Resolution For Best Re...

Merging overlapping circles and remove the union part

One approach — t = linspace(0,2*pi,500); % Allow Adequate Resolution For Best Re...

21 hours ago | 1

| accepted

Answered

Creating for loop for a piecewise function

One problem is that MATLAB subscripts are integers greater than 0, so setting ‘V’ to 0 and using it as a subscript will fail. ...

Creating for loop for a piecewise function

One problem is that MATLAB subscripts are integers greater than 0, so setting ‘V’ to 0 and using it as a subscript will fail. ...

1 day ago | 0

| accepted

Answered

"Array indices must be positive integers or logical values" for i=2 in loop

The error that throws when I run it in the online Run feature has to do with: Fxy2II=@(xxII,yyII,ffiII) 1/E*I*(-3*p*a-p(xxII-a...

"Array indices must be positive integers or logical values" for i=2 in loop

The error that throws when I run it in the online Run feature has to do with: Fxy2II=@(xxII,yyII,ffiII) 1/E*I*(-3*p*a-p(xxII-a...

1 day ago | 2

| accepted

Answered

FiltFilt function giving NaN values

The signal itself (as well as the value of ‘srate’) may be important here. (The factor of 2 is not necessary.) I have no ide...

FiltFilt function giving NaN values

The signal itself (as well as the value of ‘srate’) may be important here. (The factor of 2 is not necessary.) I have no ide...

2 days ago | 1

Answered

error using fzero in line 6

Try something like this — hw7 % Call Function function hw7 fun = @(e) hw7f...

error using fzero in line 6

Try something like this — hw7 % Call Function function hw7 fun = @(e) hw7f...

2 days ago | 0

Answered

Ho do I use symbolic expressions to define a new function?

See if this slight revision of the posted code does what you want: f = @(t) cos(t); % L = integral_a^b(sqrt(1+f'(t)^2)dt df ...

Ho do I use symbolic expressions to define a new function?

See if this slight revision of the posted code does what you want: f = @(t) cos(t); % L = integral_a^b(sqrt(1+f'(t)^2)dt df ...

2 days ago | 0

| accepted

Answered

Find min and max values in a constant interval.

The findpeaks function works, however it needs help to detect correctly the maxima and minima. Try this — opts = detectImpo...

Find min and max values in a constant interval.

The findpeaks function works, however it needs help to detect correctly the maxima and minima. Try this — opts = detectImpo...

2 days ago | 0

Answered

Multiple plots in a single graph

It is necessary to create them in a loop, storing them in a cell array. After that, a single call to the functions works — m ...

Multiple plots in a single graph

It is necessary to create them in a loop, storing them in a cell array. After that, a single call to the functions works — m ...

2 days ago | 0

| accepted

Answered

Hi , can someone help me in printing the following expressions using matlab.

See: The Not So Short Introduction to LaTeX2e for reference. .

Hi , can someone help me in printing the following expressions using matlab.

See: The Not So Short Introduction to LaTeX2e for reference. .

3 days ago | 0

Answered

Initial conditions problem ODE15S

I will copy and run that (again) if necessary. In the interim, see if actually calling the plot function works — figure pl...

Initial conditions problem ODE15S

I will copy and run that (again) if necessary. In the interim, see if actually calling the plot function works — figure pl...

3 days ago | 0

Answered

I need to convert comma ',' to dot '.'

One option in detectImportOptions (introduced in R2016b and updated in later releases) in Parameters for Text Files Only allows ...

I need to convert comma ',' to dot '.'

One option in detectImportOptions (introduced in R2016b and updated in later releases) in Parameters for Text Files Only allows ...

3 days ago | 0

Answered

Date stamp on plot

The only way I can devise to delete the date is to create new y-tick labels and use them instead — F = openfig('untitled.fig')...

Date stamp on plot

The only way I can devise to delete the date is to create new y-tick labels and use them instead — F = openfig('untitled.fig')...

3 days ago | 0

| accepted

Answered

Using trapz just for positive areas

I would just use interp1 to interpolate the data, then use trapz to integrate it. The resolution of ‘xi’ determines the precisi...

Using trapz just for positive areas

I would just use interp1 to interpolate the data, then use trapz to integrate it. The resolution of ‘xi’ determines the precisi...

4 days ago | 1

| accepted

Answered

How do I edit this bar graph? Y-axis thickness and ticks

See if the YAxisLocation and other Axis Properties and Numeric Ruler properties will do what you want.

How do I edit this bar graph? Y-axis thickness and ticks

See if the YAxisLocation and other Axis Properties and Numeric Ruler properties will do what you want.

4 days ago | 0

| accepted

Answered

Plotting an amplitude spectrum of a .txt file

Try this — D1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/647750/spec.txt'); signal = D1; L...

Plotting an amplitude spectrum of a .txt file

Try this — D1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/647750/spec.txt'); signal = D1; L...

4 days ago | 1

| accepted

Answered

Draw arc with specified angle difference

Try this — LD = load('Data.mat'); Data1 = LD.Data1; A1 = Data1(:,1); R1 = Data1(:,2); D1 = Data1(:,3); Data2 = LD.Data2...

Draw arc with specified angle difference

Try this — LD = load('Data.mat'); Data1 = LD.Data1; A1 = Data1(:,1); R1 = Data1(:,2); D1 = Data1(:,3); Data2 = LD.Data2...

4 days ago | 0

Answered

Plotting sine wave for voltage with variation of frequency

I am not certain what the desired result is. If the frequencies and amplitudes are fixed with respect to time, try this — t...

Plotting sine wave for voltage with variation of frequency

I am not certain what the desired result is. If the frequencies and amplitudes are fixed with respect to time, try this — t...

4 days ago | 0

| accepted

Answered

3D matrix surface plot animation

Try this — M = rand(10,10,5); % Create Test Matrix figure for k = 1:size(M,3) surf(M(:,:...

3D matrix surface plot animation

Try this — M = rand(10,10,5); % Create Test Matrix figure for k = 1:size(M,3) surf(M(:,:...

4 days ago | 0

| accepted

Answered

Trimming data with for loop

I am not certain what you want to do. Try this — acq2.data = randi([0 5], 10, 5) % Create Matrix i...

Trimming data with for loop

I am not certain what you want to do. Try this — acq2.data = randi([0 5], 10, 5) % Create Matrix i...

5 days ago | 0

| accepted

Answered

How do i insert seconds in a timeseries data when the frequency of the data is inconsistent?

Try this — Input_data = ['9/5/2021 11:30:00' '9/5/2021 11:30:00' '9/5/2021 11:30:00' ...

How do i insert seconds in a timeseries data when the frequency of the data is inconsistent?

Try this — Input_data = ['9/5/2021 11:30:00' '9/5/2021 11:30:00' '9/5/2021 11:30:00' ...

5 days ago | 0

Answered

4 unknown 4 equetions

syms a b c d eq1=a+b+c+d==-9.3; eq2=(b*a+2)+(2+d*c)+(c+d)*(b+a)==+7; eq3=(b+a)+(d+c)*(b*a+2)+(a+b)*(2+d*c)+(c+d)==-4.507;...

4 unknown 4 equetions

syms a b c d eq1=a+b+c+d==-9.3; eq2=(b*a+2)+(2+d*c)+(c+d)*(b+a)==+7; eq3=(b+a)+(d+c)*(b*a+2)+(a+b)*(2+d*c)+(c+d)==-4.507;...

5 days ago | 0

| accepted

Answered

Mann-Kendall test

See if the File Exchange contributions Mann-Kendall Test or Cumulative Mann-Kendall trend test will do what you want.

Mann-Kendall test

See if the File Exchange contributions Mann-Kendall Test or Cumulative Mann-Kendall trend test will do what you want.

5 days ago | 0

Answered

How do I plot points on a contour?

I am not certain what result you want. I plotted it with scatter3, however if the intent os to have lines connecting the poin...

How do I plot points on a contour?

I am not certain what result you want. I plotted it with scatter3, however if the intent os to have lines connecting the poin...

6 days ago | 0

| accepted

Answered

Filter function in MATLAB

The instability is generally not a problem with second-order-section realisation of IIR filters. The filtfilt function can oc...

Filter function in MATLAB

The instability is generally not a problem with second-order-section realisation of IIR filters. The filtfilt function can oc...

6 days ago | 0

Answered

frequently used function for table variable

I am not certain what ‘T’ looks like. Something like this would work — T = table(randi([-40 40],5,1),'VariableNames',{'OldV...

frequently used function for table variable

I am not certain what ‘T’ looks like. Something like this would work — T = table(randi([-40 40],5,1),'VariableNames',{'OldV...

6 days ago | 0

| accepted

Answered

How to select a specific column in matrices?

Concatenate them, then select the second column of the concatenated matrix — A = randi(9,4) B = randi(9,4) C = randi(9,4) D...

How to select a specific column in matrices?

Concatenate them, then select the second column of the concatenated matrix — A = randi(9,4) B = randi(9,4) C = randi(9,4) D...

6 days ago | 1

| accepted

Answered

how to edit the axes tick labels?

Some of that can be done by setting the xlim property, the rest by decreasing the width of the axes ysiung the 'Position' proper...

how to edit the axes tick labels?

Some of that can be done by setting the xlim property, the rest by decreasing the width of the axes ysiung the 'Position' proper...

6 days ago | 1

| accepted

Answered

How do I solve two ode (dct/dt and dR/dt) simultaneously with ODE45 and optimize two parameters using global optimization ?

See for one example: Parameter Estimation for a System of Differential Equations and How to properly model a kinetic reaction ...

How do I solve two ode (dct/dt and dR/dt) simultaneously with ODE45 and optimize two parameters using global optimization ?

See for one example: Parameter Estimation for a System of Differential Equations and How to properly model a kinetic reaction ...

6 days ago | 0