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

modifying/rounding/aproximating a number

One option: c = floor(a*1E4)/1E4 producing: c = 2.6598 .

modifying/rounding/aproximating a number

One option: c = floor(a*1E4)/1E4 producing: c = 2.6598 .

environ 4 heures ago | 1

| accepted

Answered

b=fprintf how to

If you want to store the result as ‘b’, use the related function sprintf: b=sprintf('%0.5g\n',a) It is a separate line of cod...

b=fprintf how to

If you want to store the result as ‘b’, use the related function sprintf: b=sprintf('%0.5g\n',a) It is a separate line of cod...

environ 5 heures ago | 1

| accepted

Answered

How to reshape the x-axis in this case?

Either: axis tight or: xlim([min(t) max(t)]) should work.

How to reshape the x-axis in this case?

Either: axis tight or: xlim([min(t) max(t)]) should work.

environ 9 heures ago | 0

| accepted

Answered

Add markers for stairs() plot, specified amount of makers

Ths stairs funciton will courteously tell what it did if asked. See Create a Stairstep Plot using plot Function.

Add markers for stairs() plot, specified amount of makers

Ths stairs funciton will courteously tell what it did if asked. See Create a Stairstep Plot using plot Function.

environ 10 heures ago | 0

Answered

How to draw Cuboid of a specific dimension

See if Drawing 3d objects and filling the sides will do what you want.

How to draw Cuboid of a specific dimension

See if Drawing 3d objects and filling the sides will do what you want.

environ 18 heures ago | 0

Answered

plotting frequency response of data in matlab

There is only one column of data, that I assume are the independent variable. You cannot plot its frequency response without an...

plotting frequency response of data in matlab

There is only one column of data, that I assume are the independent variable. You cannot plot its frequency response without an...

1 jour ago | 1

| accepted

Answered

I converted double in CSV, but I need the comma at the end of each value

If it absolutely must have commas, it is straightforward to make it happy: x = rand(5,1); fprintf('%.4f,\n', x) producing (i...

I converted double in CSV, but I need the comma at the end of each value

If it absolutely must have commas, it is straightforward to make it happy: x = rand(5,1); fprintf('%.4f,\n', x) producing (i...

1 jour ago | 0

Answered

Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Function help

Try this: fprintf('E = %23.15E\n',E) Choose the format you want.

Error using fprintf Invalid file identifier. Use fopen to generate a valid file identifier. Function help

Try this: fprintf('E = %23.15E\n',E) Choose the format you want.

1 jour ago | 0

Answered

Dealing with large timetables

The only option I can suggest to you is in the timetable documentation section on Extended Capabilities under Tall Arrays. (I h...

Dealing with large timetables

The only option I can suggest to you is in the timetable documentation section on Extended Capabilities under Tall Arrays. (I h...

1 jour ago | 0

| accepted

Answered

sorting table according to date/time

There are problems with the 'InputFormat' format string. Try this: t=datetime(T1T2.TimeStamp,'InputFormat', 'MM/dd/yyyy hh:...

sorting table according to date/time

There are problems with the 'InputFormat' format string. Try this: t=datetime(T1T2.TimeStamp,'InputFormat', 'MM/dd/yyyy hh:...

1 jour ago | 0

| accepted

Answered

index exceeding array bounds

One option would be to test ‘j’ against the number of rows in the matrix-of-interest, something like this: for j = 1:length(ra...

index exceeding array bounds

One option would be to test ‘j’ against the number of rows in the matrix-of-interest, something like this: for j = 1:length(ra...

1 jour ago | 0

Answered

Mismatched delimiters relating to log() function?

You have a typo: D(:,:,i) = [Re.^theta(2,i) log(Re.)*theta(1,i)*(Re.^theta(2,i))]; ↑...

Mismatched delimiters relating to log() function?

You have a typo: D(:,:,i) = [Re.^theta(2,i) log(Re.)*theta(1,i)*(Re.^theta(2,i))]; ↑...

2 jours ago | 0

Answered

Use fzero() to calculate x required to achieve V/F for every combination of V and F.

The fzero function is a root-finder, so the function it is given to solve must equate to 0 for any delection of independent vari...

Use fzero() to calculate x required to achieve V/F for every combination of V and F.

The fzero function is a root-finder, so the function it is given to solve must equate to 0 for any delection of independent vari...

2 jours ago | 0

| accepted

Answered

How do I fix my legend?

For every plot call, return a handle: h1 = plot(a1,b1,'ko','LineWidth',3); . . . h2 = plot(c1,d1,'bo','LineWidth'...

How do I fix my legend?

For every plot call, return a handle: h1 = plot(a1,b1,'ko','LineWidth',3); . . . h2 = plot(c1,d1,'bo','LineWidth'...

2 jours ago | 0

| accepted

Answered

Extract hourly data from minute data over a year

Try this: T1 = readtable('weather_data_2019.txt'); Idx = minute(T1.Datetime) == 0; OutTable = T1(Idx,:) producing (for this...

Extract hourly data from minute data over a year

Try this: T1 = readtable('weather_data_2019.txt'); Idx = minute(T1.Datetime) == 0; OutTable = T1(Idx,:) producing (for this...

2 jours ago | 1

| accepted

Answered

How to plot both real and imaginary part of complex exponential?

See my Answer to your duplicate Question: How to plot both real and imaginary part of complex exponential?

How to plot both real and imaginary part of complex exponential?

See my Answer to your duplicate Question: How to plot both real and imaginary part of complex exponential?

2 jours ago | 0

Answered

Numerical integration in MATLAB

Try this: c = @(T) (h.^2 .* D) ./ (2 .* pi * pi * vs * kb .* T .* T); fun = @(x,T) ((x.^4 .* exp((h.*x) ./ (kb .* T))) ./ (((...

Numerical integration in MATLAB

Try this: c = @(T) (h.^2 .* D) ./ (2 .* pi * pi * vs * kb .* T .* T); fun = @(x,T) ((x.^4 .* exp((h.*x) ./ (kb .* T))) ./ (((...

2 jours ago | 0

| accepted

Answered

Interpolate NaN on graph

If the data have NaN as the value of the dependent variable, and the independent variable is continuous (with no NaN values), th...

Interpolate NaN on graph

If the data have NaN as the value of the dependent variable, and the independent variable is continuous (with no NaN values), th...

2 jours ago | 0

| accepted

Answered

Finding all the zeroes of a discontinuous function in a particular range

It may be version-dependent. In R2020b (Update 1), I get: extrema = 13.3333 -1.0 ans = -26.666666666666666666666...

Finding all the zeroes of a discontinuous function in a particular range

It may be version-dependent. In R2020b (Update 1), I get: extrema = 13.3333 -1.0 ans = -26.666666666666666666666...

3 jours ago | 0

| accepted

Answered

EMG bandpass filter to remove 50 Hz power line

With a sampling frequency of 10 Hz, the highest frequency that can be uniquely represented is 5 Hz, which is much too low for an...

EMG bandpass filter to remove 50 Hz power line

With a sampling frequency of 10 Hz, the highest frequency that can be uniquely represented is 5 Hz, which is much too low for an...

3 jours ago | 0

| accepted

Answered

error in my code

The way you coded ‘R’: R=1000*[5, 100, 200, 250]; it only has 4 elements. Nothing exists beyond ‘R(4)’.

error in my code

The way you coded ‘R’: R=1000*[5, 100, 200, 250]; it only has 4 elements. Nothing exists beyond ‘R(4)’.

3 jours ago | 1

Answered

Finding Best Fit for Log Scaled Graphs

It is best to fit the power function using a nonlinear approach: x = [0, 0.00027036151034654, 0.00115093883458806, 0.002234322...

Finding Best Fit for Log Scaled Graphs

It is best to fit the power function using a nonlinear approach: x = [0, 0.00027036151034654, 0.00115093883458806, 0.002234322...

3 jours ago | 0

Answered

How to plot both real and imaginary part of complex exponential?

For best results, replace ‘j’ with ‘1j’, then convert the result to double to use plot (since fplot is likely to be more difficu...

How to plot both real and imaginary part of complex exponential?

For best results, replace ‘j’ with ‘1j’, then convert the result to double to use plot (since fplot is likely to be more difficu...

3 jours ago | 1

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; ...

3 jours 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 ...

3 jours 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)...

3 jours 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...

3 jours ago | 0

| accepted

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...

4 jours 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(@...

4 jours 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!

4 jours ago | 0