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

How do I troubleshoot if a plot line doesn't show up on a figure

It plots a horizontal dotted line at 55 from 0 to 7. If it works independently, then there are several possibilities, some of...

How do I troubleshoot if a plot line doesn't show up on a figure

It plots a horizontal dotted line at 55 from 0 to 7. If it works independently, then there are several possibilities, some of...

2 hours ago | 0

Answered

How to make while loop faster ?

First, the number of iterations is going to be: n_iter = 1/D_1 evaluating to: n_iter = 6.666666666666667e+12 That is...

How to make while loop faster ?

First, the number of iterations is going to be: n_iter = 1/D_1 evaluating to: n_iter = 6.666666666666667e+12 That is...

2 hours ago | 0

Answered

Genetic Algorithm: undefined function or method for input arguments of type' double '.

The fitness function needs to accept arguments, and (in general) needs to return a scalar result. That will likely require that...

Genetic Algorithm: undefined function or method for input arguments of type' double '.

The fitness function needs to accept arguments, and (in general) needs to return a scalar result. That will likely require that...

2 hours ago | 0

Answered

How to make a plot from for loop where the results are a 3x1 matrix?

Try this slight variation on your code: s=300; r=25; k=30; kukat=[s;r;k]; A=[0.23 0 233;0.74 0.52 0;0 0.35 0.46]; a=15; ...

How to make a plot from for loop where the results are a 3x1 matrix?

Try this slight variation on your code: s=300; r=25; k=30; kukat=[s;r;k]; A=[0.23 0 233;0.74 0.52 0;0 0.35 0.46]; a=15; ...

3 hours ago | 0

| accepted

Answered

Finding different length pulses

Note that ‘clean them up’ is ever so slightly ambiguous. Assuming that the objective is to remove some of what might be consi...

Finding different length pulses

Note that ‘clean them up’ is ever so slightly ambiguous. Assuming that the objective is to remove some of what might be consi...

4 hours ago | 0

Answered

Building Low-pass filter with Sinc function

I am not exactly certain what the problem is from a theoretical prespective (I will leave it to you to explore that), however th...

Building Low-pass filter with Sinc function

I am not exactly certain what the problem is from a theoretical prespective (I will leave it to you to explore that), however th...

6 hours ago | 0

Answered

Why didn't I get an error for my matrices?

You are seeing ‘Automatic Implicit Expansion’ introduced in R2016b (much to the consternation of many of us). Previously, the o...

Why didn't I get an error for my matrices?

You are seeing ‘Automatic Implicit Expansion’ introduced in R2016b (much to the consternation of many of us). Previously, the o...

7 hours ago | 0

Answered

How do you plot the phase and amplitude of a complex function?

to calculate the amplitude, use the abs function. For the phase, use the angle function.

How do you plot the phase and amplitude of a complex function?

to calculate the amplitude, use the abs function. For the phase, use the angle function.

18 hours ago | 1

Answered

How to plot spectral density given a column of data?

My guess is that there is a significant d-c (constant) offfset. This is the mean of ‘x’, and will show up as the amplitude at ...

How to plot spectral density given a column of data?

My guess is that there is a significant d-c (constant) offfset. This is the mean of ‘x’, and will show up as the amplitude at ...

22 hours ago | 1

Answered

Issues with entering into MATLAB

This sems to be homework. Vectorise the expoinentiation: y= (2*x.^1.01)+ sin(3*pi/2 *x)-10*cos(x)-3; ↑ ← HERE Th...

Issues with entering into MATLAB

This sems to be homework. Vectorise the expoinentiation: y= (2*x.^1.01)+ sin(3*pi/2 *x)-10*cos(x)-3; ↑ ← HERE Th...

22 hours ago | 0

| accepted

Answered

How to solve ODEs with time dependent parameters by ode45 method

I do not see any interp1 calls in the code you posted. To use a function in a calculation, the function needs to be evaluated...

How to solve ODEs with time dependent parameters by ode45 method

I do not see any interp1 calls in the code you posted. To use a function in a calculation, the function needs to be evaluated...

1 day ago | 0

| accepted

Answered

How to read a list of strings in a txt file?

Unless I am missing something, ‘KKK’ is never incremented inside the while loop, so it will in fact be infinite. If you are a...

How to read a list of strings in a txt file?

Unless I am missing something, ‘KKK’ is never incremented inside the while loop, so it will in fact be infinite. If you are a...

1 day ago | 0

| accepted

Answered

How can i work with a matrix that present floating points

If you want the (x,y) data for that contour, you need to ask contour to give it to you: c1000 = contour(x,y,bat_N,[-1000],'Sho...

How can i work with a matrix that present floating points

If you want the (x,y) data for that contour, you need to ask contour to give it to you: c1000 = contour(x,y,bat_N,[-1000],'Sho...

1 day ago | 0

Answered

How to find a Y value of a given X?

This is easiest if you create ‘v’ as an anonymous function: t = 0:0.00001:0.01; v = @(t) 50*exp(-1600*t) - 50*exp(-400*t); ...

How to find a Y value of a given X?

This is easiest if you create ‘v’ as an anonymous function: t = 0:0.00001:0.01; v = @(t) 50*exp(-1600*t) - 50*exp(-400*t); ...

1 day ago | 0

Answered

MATLAB R2020a not running

See if the solution in: Why will MATLAB not start up properly on my Windows based system? will work. (It worked when I had a si...

MATLAB R2020a not running

See if the solution in: Why will MATLAB not start up properly on my Windows based system? will work. (It worked when I had a si...

1 day ago | 0

Answered

How to make a square wave with a pulse

This is a slight variation on the method I showed you when you presented a similar problem yesterday in How to create a square w...

How to make a square wave with a pulse

This is a slight variation on the method I showed you when you presented a similar problem yesterday in How to create a square w...

1 day ago | 0

Answered

Undefined function or variable 'solv'.

Where did you save it? You must save it to a directory or your MATLAB user path, and MATLAB has to know that directory exists...

Undefined function or variable 'solv'.

Where did you save it? You must save it to a directory or your MATLAB user path, and MATLAB has to know that directory exists...

1 day ago | 0

Answered

How to add a column to a table

Try this: Stream = mat2cell(randi(9,6,4), 6, ones(1,4)); % Create Stream WL = Stream{:,2}; H = Stream...

How to add a column to a table

Try this: Stream = mat2cell(randi(9,6,4), 6, ones(1,4)); % Create Stream WL = Stream{:,2}; H = Stream...

1 day ago | 0

Answered

DateTime conversion from Table Column

The datetime function has a 'ConvertFrom' option. For one example, see: Convert Excel Date Number to Datetime There are other ...

DateTime conversion from Table Column

The datetime function has a 'ConvertFrom' option. For one example, see: Convert Excel Date Number to Datetime There are other ...

1 day ago | 0

| accepted

Answered

how to modify the axis labels in the attached plot?

I could not get the axis tick labels to show with imshow, so I went with image instead (and a bit of manual editing to import th...

how to modify the axis labels in the attached plot?

I could not get the axis tick labels to show with imshow, so I went with image instead (and a bit of manual editing to import th...

2 days ago | 1

Answered

How can I save my results of a loop in one table

The adtest function returns scalars for the outputs, so something like this could work: [h(v_b, v_T),p(v_b, v_T)] = adtest(dat...

How can I save my results of a loop in one table

The adtest function returns scalars for the outputs, so something like this could work: [h(v_b, v_T),p(v_b, v_T)] = adtest(dat...

2 days ago | 1

| accepted

Answered

How to create a square wave pulse

Without the Signal Processing Toolbox: t = linspace(0, 10E-3); % Time Vector (0 - 10ms) f = 3...

How to create a square wave pulse

Without the Signal Processing Toolbox: t = linspace(0, 10E-3); % Time Vector (0 - 10ms) f = 3...

2 days ago | 0

Answered

How to specify parameters for matlab's notch filter function

The Q-factor is the resonant frequency divided by the bandwidth, so smaller bandwidths result in higher Q-factors. The Q-factor...

How to specify parameters for matlab's notch filter function

The Q-factor is the resonant frequency divided by the bandwidth, so smaller bandwidths result in higher Q-factors. The Q-factor...

2 days ago | 0

Answered

How to compare an integer to the elements of a vector?

Another approach: val = min(C(u<C)); idx = find(C == val); .

How to compare an integer to the elements of a vector?

Another approach: val = min(C(u<C)); idx = find(C == val); .

2 days ago | 0

Answered

how can I put the histfit function in terms of probability?

That is not directly possible with histfit, however it is not impossible: data = randn(1,100)+1; ...

how can I put the histfit function in terms of probability?

That is not directly possible with histfit, however it is not impossible: data = randn(1,100)+1; ...

3 days ago | 0

Answered

An error of using fprintf

Printing different variable classes (such as numeric and character), requires a loop: for k = 1 : something fprintf(fileI...

An error of using fprintf

Printing different variable classes (such as numeric and character), requires a loop: for k = 1 : something fprintf(fileI...

3 days ago | 0

| accepted

Answered

Error with passing a fitness function into a GA command

This is a bit confusing. First, ‘NSD_Fitness’ should be: function y = NSD_Fitness(X,CombinedYieldRank,CombinedPPIRank,r) y...

Error with passing a fitness function into a GA command

This is a bit confusing. First, ‘NSD_Fitness’ should be: function y = NSD_Fitness(X,CombinedYieldRank,CombinedPPIRank,r) y...

3 days ago | 0

| accepted

Answered

Undefined operator '-' for input arguments of type 'cell'.

Try this: T = readtable('FindDifference.xlsx'); T.INFODT = datetime(T.INFODT); T.BIRTHDT = datetime(T.BIRTHDT); T.Time = ye...

Undefined operator '-' for input arguments of type 'cell'.

Try this: T = readtable('FindDifference.xlsx'); T.INFODT = datetime(T.INFODT); T.BIRTHDT = datetime(T.BIRTHDT); T.Time = ye...

4 days ago | 0

| accepted

Answered

sum function usage for string

Subtracting ASCII 0 from an ASCII string converts the string to numeric values. There is some controversy as to that being ‘c...

sum function usage for string

Subtracting ASCII 0 from an ASCII string converts the string to numeric values. There is some controversy as to that being ‘c...

4 days ago | 0

| accepted