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

Changing the legend color

Try something like this: y = linspace(0,50,50); % Create Data v = 1:14; ...

Changing the legend color

Try something like this: y = linspace(0,50,50); % Create Data v = 1:14; ...

13 hours ago | 0

| accepted

Answered

plotting concentric circles using contour

Use the axis function, specifically either: axis('equal') % Function Expression or: axis equal ...

plotting concentric circles using contour

Use the axis function, specifically either: axis('equal') % Function Expression or: axis equal ...

14 hours ago | 0

| accepted

Answered

Graph help in matlab

This is not your function, however it illustrates the ‘logical indexing’ approach to such problems: f = @(x) (2-2*x).*(x <= 0)...

Graph help in matlab

This is not your function, however it illustrates the ‘logical indexing’ approach to such problems: f = @(x) (2-2*x).*(x <= 0)...

14 hours ago | 0

Answered

Pseudo Element by Element Vector Subtraction

See if this does what you want: C1 = A(:,1).' - B(:,1); % Col #1 In ‘A’ - Col #1 I...

Pseudo Element by Element Vector Subtraction

See if this does what you want: C1 = A(:,1).' - B(:,1); % Col #1 In ‘A’ - Col #1 I...

15 hours ago | 0

Answered

Numbers in command window printed 10000 times smaller

I suspect there is an exponent indication out-of-view in the image you posted. When I read and reshape your file as in your p...

Numbers in command window printed 10000 times smaller

I suspect there is an exponent indication out-of-view in the image you posted. When I read and reshape your file as in your p...

17 hours ago | 0

| accepted

Answered

How to write Pearcey functions?

I would code them as: Pe1 = @(x) integral(@(s) exp(1i*(s.^4 + s.^2.*x)), -Inf, Inf, 'ArrayValued',1); Pe2 = @(x,y) integral(@...

How to write Pearcey functions?

I would code them as: Pe1 = @(x) integral(@(s) exp(1i*(s.^4 + s.^2.*x)), -Inf, Inf, 'ArrayValued',1); Pe2 = @(x,y) integral(@...

19 hours ago | 0

Answered

simple code error, help me please

Use element-wise operations: v = 0:3; w = sqrt(2*11.9*(8.85*10^-14)*((10^16)+(10^18))*(0.817+v)/((1.6*10^-19)*(10^16)*(10^18)...

simple code error, help me please

Use element-wise operations: v = 0:3; w = sqrt(2*11.9*(8.85*10^-14)*((10^16)+(10^18))*(0.817+v)/((1.6*10^-19)*(10^16)*(10^18)...

20 hours ago | 0

Answered

Is there any ways to find all elements' rows and cols number at once?

Meet the size function!

Is there any ways to find all elements' rows and cols number at once?

Meet the size function!

20 hours ago | 0

Answered

Separate a time signal for each frequency

The pspectrum function (introduced in R2017b) with the 'spectrogram' type may be what you want. It produces a spectrogram plot ...

Separate a time signal for each frequency

The pspectrum function (introduced in R2017b) with the 'spectrogram' type may be what you want. It produces a spectrogram plot ...

22 hours ago | 0

Answered

Error when using fminsearch to find least squares fit of data using a given equation

I can’t figure out from your code what your independent and dependent variables are. As a general rule, the argument to fmins...

Error when using fminsearch to find least squares fit of data using a given equation

I can’t figure out from your code what your independent and dependent variables are. As a general rule, the argument to fmins...

22 hours ago | 0

Answered

How do I convert a transfer function of a low pass filter to bandpass?

If you want to use the Signal Processing Toolbox functions, this works: syms s; N=4; for k=1:N w=((2*k+N-1)/(2*N))*pi; ...

How do I convert a transfer function of a low pass filter to bandpass?

If you want to use the Signal Processing Toolbox functions, this works: syms s; N=4; for k=1:N w=((2*k+N-1)/(2*N))*pi; ...

1 day ago | 0

Answered

Designing a bandpass filter

See if the bandpass fucntion works for you.

Designing a bandpass filter

See if the bandpass fucntion works for you.

1 day ago | 0

| accepted

Answered

How to select every second number from a file of numbers separated by a comma

I looked at ‘UE1.txt’ and I initially could not make any sense out of it. It’s apparently supposed to be a multi-channel record...

How to select every second number from a file of numbers separated by a comma

I looked at ‘UE1.txt’ and I initially could not make any sense out of it. It’s apparently supposed to be a multi-channel record...

1 day ago | 0

| accepted

Answered

plotting a graph with different conditions using if statement

Your code can be made significantly more efficient by using vectorisation and ‘logical indesing’: mu_a1 = 0.1; %absorption coe...

plotting a graph with different conditions using if statement

Your code can be made significantly more efficient by using vectorisation and ‘logical indesing’: mu_a1 = 0.1; %absorption coe...

1 day ago | 1

| accepted

Answered

Deleting Some initials of The Matrix

It depends on the functions you have available. It appears to be a text file, so one option would be textscan: fidi = fopen('...

Deleting Some initials of The Matrix

It depends on the functions you have available. It appears to be a text file, so one option would be textscan: fidi = fopen('...

2 days ago | 0

| accepted

Answered

Requesting help for piecewise ploting

The Symbolic Math Toolbox and here particularly the piecewise funciton may not be the best option for this problem. Use ordin...

Requesting help for piecewise ploting

The Symbolic Math Toolbox and here particularly the piecewise funciton may not be the best option for this problem. Use ordin...

2 days ago | 0

Answered

Need Help New to MATLAB

To make them not be fractions, use vpasolve or vpa on the result: F2s = vpasolve(Fwy+F1y+F2y == 0,F2) F1s = vpasolve(Fwx+F1x+...

Need Help New to MATLAB

To make them not be fractions, use vpasolve or vpa on the result: F2s = vpasolve(Fwy+F1y+F2y == 0,F2) F1s = vpasolve(Fwx+F1x+...

2 days ago | 0

| accepted

Answered

Matlab returns empty symbol when solving laplace transform

Try this: syms s t C1 C2 R1 R2 i(t) I(s) eqn(t) = 0 == R1*i(t) + R2*i(t) + diff(i(t), t)/10 + int(i(t), t)/C1 + int(i(t), t)/...

Matlab returns empty symbol when solving laplace transform

Try this: syms s t C1 C2 R1 R2 i(t) I(s) eqn(t) = 0 == R1*i(t) + R2*i(t) + diff(i(t), t)/10 + int(i(t), t)/C1 + int(i(t), t)/...

2 days ago | 0

Answered

Ploting an anonymous function

It appears that ‘Cw’ also needs to be an anonymous funciton, however it is absolutely not obvious what variable it supposed to b...

Ploting an anonymous function

It appears that ‘Cw’ also needs to be an anonymous funciton, however it is absolutely not obvious what variable it supposed to b...

2 days ago | 0

Answered

Need the function or Equation that solve this kind of questions?

This is not your function, however it illustrates the ‘logical indexing’ approach: f = @(x) (2-2*x).*(x <= 0) + (2+2*x).*(x>0)...

Need the function or Equation that solve this kind of questions?

This is not your function, however it illustrates the ‘logical indexing’ approach: f = @(x) (2-2*x).*(x <= 0) + (2+2*x).*(x>0)...

3 days ago | 0

Answered

No lines on my graph

I suspect that ‘t’ is supposed to be a vector: t=0:3600; %time in seconds and then using element-wise division in the ‘T’ ass...

No lines on my graph

I suspect that ‘t’ is supposed to be a vector: t=0:3600; %time in seconds and then using element-wise division in the ‘T’ ass...

3 days ago | 0

Answered

Interp1 Error using interp1>reshapeAndSortXandV

I have absolutely no idea what you’re doing. For signal processing applications, use the resample function.

Interp1 Error using interp1>reshapeAndSortXandV

I have absolutely no idea what you’re doing. For signal processing applications, use the resample function.

4 days ago | 0

Answered

Plot of a numerical integration

Try this: zv = linspace(0, 1); for k = 1:numel(zv) z = zv(k); u_int(k) = integral(@(u) sqrt(u)/((exp(u)/z)-1) + z/(...

Plot of a numerical integration

Try this: zv = linspace(0, 1); for k = 1:numel(zv) z = zv(k); u_int(k) = integral(@(u) sqrt(u)/((exp(u)/z)-1) + z/(...

4 days ago | 0

| accepted

Answered

Delete parts of plotted figures?

Try this: axis equal hold on caca=2*pi(); ang=linspace(0,caca); xp=5*cos(ang); yp=5*sin(ang); circ=[xp;yp]; L1x = lin...

Delete parts of plotted figures?

Try this: axis equal hold on caca=2*pi(); ang=linspace(0,caca); xp=5*cos(ang); yp=5*sin(ang); circ=[xp;yp]; L1x = lin...

4 days ago | 0

Answered

Getting Empty sym: 0-by-1 when using solve function

First, ‘[M1,M2,M3,M4,M5,]’ do not exist anywhere, so please do not refer to them. Second, the correct syntax for solve is: ...

Getting Empty sym: 0-by-1 when using solve function

First, ‘[M1,M2,M3,M4,M5,]’ do not exist anywhere, so please do not refer to them. Second, the correct syntax for solve is: ...

4 days ago | 0

Answered

Initial and end artifacts after applying digital filter (filtfilt)

In many situations that is caused by the signal having a significant d-c (constant) offset. There are two general ways to deal ...

Initial and end artifacts after applying digital filter (filtfilt)

In many situations that is caused by the signal having a significant d-c (constant) offset. There are two general ways to deal ...

4 days ago | 0

| accepted

Answered

Can someone tell me why my graph isn't plotting?

Subscript ‘Cl’ and ‘Cd’ in the loop: Cl(i) = (Fl(i)/(Pd(i)*A)) Cd(i) = (Fd(i)/(Pd(i)*A)) .

Can someone tell me why my graph isn't plotting?

Subscript ‘Cl’ and ‘Cd’ in the loop: Cl(i) = (Fl(i)/(Pd(i)*A)) Cd(i) = (Fd(i)/(Pd(i)*A)) .

4 days ago | 0

| accepted

Answered

Plot Solid Positive-Valued/Dashed Negative-Valued Contour Plot

The contour function itself cannot do that, however it is srtaightforward to adapt it: [X,Y,Z] = peaks; figure hold on [C...

Plot Solid Positive-Valued/Dashed Negative-Valued Contour Plot

The contour function itself cannot do that, however it is srtaightforward to adapt it: [X,Y,Z] = peaks; figure hold on [C...

4 days ago | 0

| accepted

Answered

plot cdf and calculate 90th percentile value

To plot the dashed lines at the appropriate percentiles: pctl = [50 90]; pctlv = prctile(z_cdf,[50 90]); % answer is 30.9361 ...

plot cdf and calculate 90th percentile value

To plot the dashed lines at the appropriate percentiles: pctl = [50 90]; pctlv = prctile(z_cdf,[50 90]); % answer is 30.9361 ...

4 days ago | 0

Answered

How to find the slope of the tangent on the graph at X=0 and Y=0 for the given current-voltage graph

I am not certain what you want. See if the gradient funciton does what you want. It requires evenly-spaced data with known d...

How to find the slope of the tangent on the graph at X=0 and Y=0 for the given current-voltage graph

I am not certain what you want. See if the gradient funciton does what you want. It requires evenly-spaced data with known d...

5 days ago | 0