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 can I insert a separate line of text with inputdlg?

Try this: dlgtitle = 'Please fill in the following variables: '; prompt = {'Age','Height','Weight'}; vc = inputdlg(prompt, d...

How can I insert a separate line of text with inputdlg?

Try this: dlgtitle = 'Please fill in the following variables: '; prompt = {'Age','Height','Weight'}; vc = inputdlg(prompt, d...

environ 2 heures ago | 0

Answered

Error using detrend. Too many output arguments

You are asking detrend to remove a linear trend. To get the slope and intercept of your data, use the polyfit function. Ther...

Error using detrend. Too many output arguments

You are asking detrend to remove a linear trend. To get the slope and intercept of your data, use the polyfit function. Ther...

environ 4 heures ago | 1

Answered

What is the meaning of a KW in a specification of a grid?

Think about it. Power (kW or kVA) is voltage multiplied by current. There is no current if there is no load.

What is the meaning of a KW in a specification of a grid?

Think about it. Power (kW or kVA) is voltage multiplied by current. There is no current if there is no load.

environ 6 heures ago | 0

Answered

Problem in statistical test

The terminology can be confusing. From the Wikipedia article Null hypothesis (Basic definitions): "The statement being tested...

Problem in statistical test

The terminology can be confusing. From the Wikipedia article Null hypothesis (Basic definitions): "The statement being tested...

environ 6 heures ago | 0

Answered

Solver Profiler: Operands to the || and && operators must be convertible to logical scalar values

That error occurs when the variables to be compared using the ‘short circuit’ operators ‘||’ or ‘&&’ are vectors rather than sca...

Solver Profiler: Operands to the || and && operators must be convertible to logical scalar values

That error occurs when the variables to be compared using the ‘short circuit’ operators ‘||’ or ‘&&’ are vectors rather than sca...

environ 15 heures ago | 0

Answered

Non linear noise on ecg signal

See: Contaminate an EMG with 50 Hz signal for one example.

Non linear noise on ecg signal

See: Contaminate an EMG with 50 Hz signal for one example.

environ 16 heures ago | 0

Answered

plot a sine wave of a vector

Try this: y = load('Data.txt'); x = linspace(0, numel(y), numel(y)); figure plot(x, y) grid It does not look a lot like...

plot a sine wave of a vector

Try this: y = load('Data.txt'); x = linspace(0, numel(y), numel(y)); figure plot(x, y) grid It does not look a lot like...

environ 18 heures ago | 0

Answered

please tell the solution

If ‘T’ is a scalar, note that ‘Cp’ is also a scalar, so by definition it is a (1x1) array. Referring to it with any dimension g...

please tell the solution

If ‘T’ is a scalar, note that ‘Cp’ is also a scalar, so by definition it is a (1x1) array. Referring to it with any dimension g...

environ 19 heures ago | 0

| accepted

Answered

How can I get the central frequency out of a fft?

Not possible to run your code. One option is to use islocalmax, specifically using 'FlatSelection','center'.

How can I get the central frequency out of a fft?

Not possible to run your code. One option is to use islocalmax, specifically using 'FlatSelection','center'.

environ 21 heures ago | 0

Answered

How to prevent overlapping of graph lines?

Use a logarithmic y-axis: x = [20000, 40000, 60000, 80000, 100000]; y1 = [100232986, 397895944, 900510601, 1597421811, 249452...

How to prevent overlapping of graph lines?

Use a logarithmic y-axis: x = [20000, 40000, 60000, 80000, 100000]; y1 = [100232986, 397895944, 900510601, 1597421811, 249452...

environ 22 heures ago | 0

Answered

Estimate the unknown parameters of an equation with the help of matlab?

Parameter estimation is straightforward in MATLAB, even for relatively complicated problems. Write your objective function to...

Estimate the unknown parameters of an equation with the help of matlab?

Parameter estimation is straightforward in MATLAB, even for relatively complicated problems. Write your objective function to...

1 jour ago | 0

Answered

Derivatives for trig functions

Start with the Symbolic Math Toolbox: syms x positive real y(x) = asec(3*x^2+1); then use the appropriate function to calcul...

Derivatives for trig functions

Start with the Symbolic Math Toolbox: syms x positive real y(x) = asec(3*x^2+1); then use the appropriate function to calcul...

1 jour ago | 0

| accepted

Answered

Problem with intersect function

The intersectt function does not allow tolerances, so floating-point approximation error is going to present problems. Try th...

Problem with intersect function

The intersectt function does not allow tolerances, so floating-point approximation error is going to present problems. Try th...

1 jour ago | 0

| accepted

Answered

MATLAB GA reject individual after fitness function evaluation

‘Now, I would like to be able to reject an individual in case some of its parameters (computed in Hysys) don’t respect my indica...

MATLAB GA reject individual after fitness function evaluation

‘Now, I would like to be able to reject an individual in case some of its parameters (computed in Hysys) don’t respect my indica...

2 jours ago | 0

Answered

zero crossings with interpolation

Mohamed Jamal — Since you requested my response, I am posting this Answer. One of the first Answers I posted on this topic (i...

zero crossings with interpolation

Mohamed Jamal — Since you requested my response, I am posting this Answer. One of the first Answers I posted on this topic (i...

2 jours ago | 0

Answered

Vector output prints one after another

If you have R2013b or later, put them in a table: OutTable = table(t.', omega.',theta.',alpha.',Etotal.', 'VariableNames',{f, ...

Vector output prints one after another

If you have R2013b or later, put them in a table: OutTable = table(t.', omega.',theta.',alpha.',Etotal.', 'VariableNames',{f, ...

3 jours ago | 0

| accepted

Answered

Array Indices Must Be Positive Values

The problem is: v_y0 = @(y_0)((6*x_0(n*t_t)-s)-y_0)*n*s-2*n*x_0(4-3*c)*(1-c)/(4*s-3*n*t_t)*s+4*((1-c)^2); ...

Array Indices Must Be Positive Values

The problem is: v_y0 = @(y_0)((6*x_0(n*t_t)-s)-y_0)*n*s-2*n*x_0(4-3*c)*(1-c)/(4*s-3*n*t_t)*s+4*((1-c)^2); ...

3 jours ago | 0

Answered

Using vpasolve to store an array of solutions

Use solve instead of vpasolve, then use vpa on each of the results: s=solve([eqn1,eqn2,eqn3,eqn4],[theta4,theta5,la,lc]); sth...

Using vpasolve to store an array of solutions

Use solve instead of vpasolve, then use vpa on each of the results: s=solve([eqn1,eqn2,eqn3,eqn4],[theta4,theta5,la,lc]); sth...

3 jours ago | 0

Answered

how can i found the best linear function representing the following points ???

Try this: x=[ 0 0.6 1.2 1.8 2.4 2.8 ] fx=[ 1.1 2.5 4.9 6.4 9.3 14.1 ] B = [x(:) ones(size(x(:)))] \ fx(:); % ...

how can i found the best linear function representing the following points ???

Try this: x=[ 0 0.6 1.2 1.8 2.4 2.8 ] fx=[ 1.1 2.5 4.9 6.4 9.3 14.1 ] B = [x(:) ones(size(x(:)))] \ fx(:); % ...

3 jours ago | 0

| accepted

Answered

Different number of elements error.

Initially, you assign ‘g’ to the gravitational acceleration constant: theta0 = pi/3; g = 9.81; L = 1; then here you assign ‘g...

Different number of elements error.

Initially, you assign ‘g’ to the gravitational acceleration constant: theta0 = pi/3; g = 9.81; L = 1; then here you assign ‘g...

3 jours ago | 0

| accepted

Answered

How to resolve empty inputdlg box issue?

Try this: a = inputdlg('Type a number:') if isempty(a{:}) disp('a is empty') % Info...

How to resolve empty inputdlg box issue?

Try this: a = inputdlg('Type a number:') if isempty(a{:}) disp('a is empty') % Info...

3 jours ago | 1

| accepted

Answered

How to get UTC time in my program?

Try this: dtLCL = datetime('now', 'TimeZone','local') % Current Local Time dtUTC = datetime(dtLCL, 'TimeZone'...

How to get UTC time in my program?

Try this: dtLCL = datetime('now', 'TimeZone','local') % Current Local Time dtUTC = datetime(dtLCL, 'TimeZone'...

3 jours ago | 0

| accepted

Answered

Can I set the initial value of the solution in "solve" function? Like "fsolve" function?

The vpasolve function allows initial estimates and ranges, See: Find Multiple Solutions by Specifying Initial Guesses and relat...

Can I set the initial value of the solution in "solve" function? Like "fsolve" function?

The vpasolve function allows initial estimates and ranges, See: Find Multiple Solutions by Specifying Initial Guesses and relat...

3 jours ago | 0

| accepted

Answered

Adding multiple rows of a cell array

Try this: D = load('NumericalFourierForce.mat'); Numerical_FourierForce = D.Numerical_FourierForce; Out = cellfun(@(x){sum...

Adding multiple rows of a cell array

Try this: D = load('NumericalFourierForce.mat'); Numerical_FourierForce = D.Numerical_FourierForce; Out = cellfun(@(x){sum...

3 jours ago | 0

| accepted

Answered

To change the recording frequency of biomechanical data from 60 Hz to 100 Hz

I would advise against using interp1. Instead use the Signal Processing Toolbox resample fucntion, since it uses an anti-aliasi...

To change the recording frequency of biomechanical data from 60 Hz to 100 Hz

I would advise against using interp1. Instead use the Signal Processing Toolbox resample fucntion, since it uses an anti-aliasi...

4 jours ago | 0

| accepted

Answered

how to sort each line in a text file by the first character in a line?

The data you posted is a bit difficult to work with, so I created my own version that should work with it. It assumes your data...

how to sort each line in a text file by the first character in a line?

The data you posted is a bit difficult to work with, so I created my own version that should work with it. It assumes your data...

4 jours ago | 0

| accepted

Answered

stop band ripples vs stop band attenuation?

For all intents and purposes, they are the same thing. In filters with stopband ripples, that parameter sets the stopband atten...

stop band ripples vs stop band attenuation?

For all intents and purposes, they are the same thing. In filters with stopband ripples, that parameter sets the stopband atten...

4 jours ago | 0

| accepted

Answered

how can one set the default size of font for plot?

Experiment with: Default Property Values

how can one set the default size of font for plot?

Experiment with: Default Property Values

5 jours ago | 0

| accepted

Answered

plot for a part of x

Experiment witth this example: dt = datetime([2001 01 01])+calmonths(0:(2021-2001)*12); % ‘datetime’ Vector y = ra...

plot for a part of x

Experiment witth this example: dt = datetime([2001 01 01])+calmonths(0:(2021-2001)*12); % ‘datetime’ Vector y = ra...

5 jours ago | 0

Answered

I cannot get these error bars to work for the life of me

This unfortunately will not work with categorical variables, so it is necessary to define the x-coordinates as numeric, then lab...

I cannot get these error bars to work for the life of me

This unfortunately will not work with categorical variables, so it is necessary to define the x-coordinates as numeric, then lab...

5 jours ago | 0

| accepted