Answered

how to make anonymous function and it's plot?

Either include all of them as arguments: R=@(wl,T,h,c,k) 2*pi*c^2*h./(wl.^5)./(exp(h*c./wl/k/T)-1); h=6.626e-34; c=3e8; k...

how to make anonymous function and it's plot?

Either include all of them as arguments: R=@(wl,T,h,c,k) 2*pi*c^2*h./(wl.^5)./(exp(h*c./wl/k/T)-1); h=6.626e-34; c=3e8; k...

5 giorni ago | 0

Answered

Detect and remove the artifacts in PPG signal via MATLAB

One approach: D1 = load('Leo David (2) Examples.mat'); ppg85 = D1.ppg(85).data; idx = find(ppg85 < -2); ppg85(1:max(idx))...

Detect and remove the artifacts in PPG signal via MATLAB

One approach: D1 = load('Leo David (2) Examples.mat'); ppg85 = D1.ppg(85).data; idx = find(ppg85 < -2); ppg85(1:max(idx))...

5 giorni ago | 0

Answered

How to plot x-y and x respect to t and y respect to t diagram with ODE ?

See the documentation section on Solve a System of Differential Equations in the Symbolic Math Toolbox documentation. It will d...

How to plot x-y and x respect to t and y respect to t diagram with ODE ?

See the documentation section on Solve a System of Differential Equations in the Symbolic Math Toolbox documentation. It will d...

5 giorni ago | 0

| accepted

Answered

how to plot points in plotted graph?

I have absolutely no idea how you want them plotted. Try this: I=[116 207 414 611 909 1009 951 909 805 615 311 120]; Ta=[...

how to plot points in plotted graph?

I have absolutely no idea how you want them plotted. Try this: I=[116 207 414 611 909 1009 951 909 805 615 311 120]; Ta=[...

6 giorni ago | 1

| accepted

Answered

Error in ode45; Graphing ODE

Note that ‘cdcdt’ is not the same as ‘dcdt’. Change this to: dcdt = [ p(1).*((p(2)*k+k)/v1); p(2).*((k*p(1)-k)-cbar/v2...

Error in ode45; Graphing ODE

Note that ‘cdcdt’ is not the same as ‘dcdt’. Change this to: dcdt = [ p(1).*((p(2)*k+k)/v1); p(2).*((k*p(1)-k)-cbar/v2...

6 giorni ago | 1

| accepted

Answered

Integral construction and betainv

Since ‘pbar’ and ‘rho’ are vectors, use the 'ArrayValued' name-value pair in the integral call: ES_95=(1/(1-alpha))*integral(@...

Integral construction and betainv

Since ‘pbar’ and ‘rho’ are vectors, use the 'ArrayValued' name-value pair in the integral call: ES_95=(1/(1-alpha))*integral(@...

6 giorni ago | 0

| accepted

Answered

Steady-state value?

The step function has a number of outputs that you can request from it. The documentation section on Step Responses of Identifi...

Steady-state value?

The step function has a number of outputs that you can request from it. The documentation section on Step Responses of Identifi...

6 giorni ago | 0

Answered

Normal distribution function in Matlab

Use element-wise operations on every multiplication, division (and exponentiation, although not used here). This works: tau...

Normal distribution function in Matlab

Use element-wise operations on every multiplication, division (and exponentiation, although not used here). This works: tau...

6 giorni ago | 1

| accepted

Answered

How to change exponentiation

I wrote a littlle utility function for my own use a while back to do this. Adapt it to do what you want: expstr = @(x,n) [x...

How to change exponentiation

I wrote a littlle utility function for my own use a while back to do this. Adapt it to do what you want: expstr = @(x,n) [x...

6 giorni ago | 0

| accepted

Answered

Low pass filter design

My preference would be an elliptic IIR filter for efficiency. See the documentation for ellip for details. For best results, b...

Low pass filter design

My preference would be an elliptic IIR filter for efficiency. See the documentation for ellip for details. For best results, b...

6 giorni ago | 0

| accepted

Answered

Butterworth Bandpass filter and discreate fcn

The bilinear approach would be my choice. Also consider the impinvar function. These appear to be the only Signal Processing...

Butterworth Bandpass filter and discreate fcn

The bilinear approach would be my choice. Also consider the impinvar function. These appear to be the only Signal Processing...

6 giorni ago | 0

Answered

If clause – if column blank than

Try this instead: if isempty(data_pp.Anxiety_RESP) .

If clause – if column blank than

Try this instead: if isempty(data_pp.Anxiety_RESP) .

7 giorni ago | 0

Answered

Plotting amplitude of individual frequencies over time.

The pspectrum function can likely do what you want. Use the 'spectrogram' type and choose the x-axis column that corresponds to...

Plotting amplitude of individual frequencies over time.

The pspectrum function can likely do what you want. Use the 'spectrogram' type and choose the x-axis column that corresponds to...

7 giorni ago | 0

| accepted

Answered

fminsearch with matrices help

This might do what you want: x = rand(150,3); % Create Data y = rand(150,3); ...

fminsearch with matrices help

This might do what you want: x = rand(150,3); % Create Data y = rand(150,3); ...

7 giorni ago | 0

Answered

Store value of variable computed in ODE Solver at the specified time steps.

There are not enough variables provided to run your code. This is how I would do it: tspan = 0:0.01:10; options = odeset('...

Store value of variable computed in ODE Solver at the specified time steps.

There are not enough variables provided to run your code. This is how I would do it: tspan = 0:0.01:10; options = odeset('...

7 giorni ago | 1

| accepted

Answered

how to make smooth the vertcat of more vectors

I am not certain what you want, since the posted file is not the same as the posted plot image. Try this: y = readmatrix('c...

how to make smooth the vertcat of more vectors

I am not certain what you want, since the posted file is not the same as the posted plot image. Try this: y = readmatrix('c...

7 giorni ago | 0

| accepted

Answered

How to print Rsdnrm after fitting?

The ‘Rsdnrm’ output is a scalar double value, and exists in the workspace after lsqcurvefit completes its estimation. Just use ...

How to print Rsdnrm after fitting?

The ‘Rsdnrm’ output is a scalar double value, and exists in the workspace after lsqcurvefit completes its estimation. Just use ...

7 giorni ago | 0

Answered

drawcircle function outputs circle or oval by default?

Use: axis('equal') and it magically becomes a circle! See the documentation on axis for details.

drawcircle function outputs circle or oval by default?

Use: axis('equal') and it magically becomes a circle! See the documentation on axis for details.

8 giorni ago | 0

Answered

How to find the upper limit of a complex integral

I’ve been working on this for a while. This works, however at some point, fsolve finds undefined values at the intial point, ...

How to find the upper limit of a complex integral

I’ve been working on this for a while. This works, however at some point, fsolve finds undefined values at the intial point, ...

8 giorni ago | 0

| accepted

Answered

How to fix my code for ode45

Delete the single quotation marks. This runs without error: f = @(x,y) (9*14^(1/2)*exp(-(2*x)/9)*sin((14^(1/2)*x)/9))/7; [...

How to fix my code for ode45

Delete the single quotation marks. This runs without error: f = @(x,y) (9*14^(1/2)*exp(-(2*x)/9)*sin((14^(1/2)*x)/9))/7; [...

8 giorni ago | 0

| accepted

Answered

What is wrong with my code it keeps telling me that i have 'Error: File: labmaterials.m Line: 67 Column: 109 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

The problems are too many to specifically enumerate: Ms(iii)=2/pi*(w1*log*[tan*[acos*[w1/l_vector]]+l_vector/w1]+l_vector*(pi/...

What is wrong with my code it keeps telling me that i have 'Error: File: labmaterials.m Line: 67 Column: 109 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

The problems are too many to specifically enumerate: Ms(iii)=2/pi*(w1*log*[tan*[acos*[w1/l_vector]]+l_vector/w1]+l_vector*(pi/...

8 giorni ago | 0

| accepted

Answered

Plot / Solve system for nontrivial answer. dot operator issue?

Since you wnat a numeric result, use vpasolve instead, wither with an initial value (if you have an idea of what that is) or a r...

Plot / Solve system for nontrivial answer. dot operator issue?

Since you wnat a numeric result, use vpasolve instead, wither with an initial value (if you have an idea of what that is) or a r...

8 giorni ago | 0

| accepted

Answered

Should I use the absolute value of fast Fourier transform or the conjugate in signal analysis?

Note that the plot is ‘Power Spectral Density’. Power is the square of magnitude. The abs value is the square root of the co...

Should I use the absolute value of fast Fourier transform or the conjugate in signal analysis?

Note that the plot is ‘Power Spectral Density’. Power is the square of magnitude. The abs value is the square root of the co...

8 giorni ago | 0

| accepted

Answered

How can I solve a problem related to the output argument.

The way I usually deal with this is to define all the outputs as NaN in the beginning of the function. The ones that are assign...

How can I solve a problem related to the output argument.

The way I usually deal with this is to define all the outputs as NaN in the beginning of the function. The ones that are assign...

8 giorni ago | 0

Answered

Matlab on a new computer

First, back up all your user files (including yuour startup.m file if you created one) to a thumb drive or SD chip and transfer ...

Matlab on a new computer

First, back up all your user files (including yuour startup.m file if you created one) to a thumb drive or SD chip and transfer ...

8 giorni ago | 0

Answered

Plotting mean across a graph

Try this: plot(xlim, [1 1]*Ymean, 'r','LineWidth',1.5) The ‘Ymean’ value should be a constant, so it is necessary to plot it ...

Plotting mean across a graph

Try this: plot(xlim, [1 1]*Ymean, 'r','LineWidth',1.5) The ‘Ymean’ value should be a constant, so it is necessary to plot it ...

9 giorni ago | 0

Answered

How to get fmincon to work with an ode45?

See: Optimizing a Simulation or Ordinary Differential Equation

How to get fmincon to work with an ode45?

See: Optimizing a Simulation or Ordinary Differential Equation

9 giorni ago | 0

| accepted

Answered

XLabel and YLabel Font Size

The Control System (and System Identification) Toolbox plot functions properties are difficult to change. That can be done, how...

XLabel and YLabel Font Size

The Control System (and System Identification) Toolbox plot functions properties are difficult to change. That can be done, how...

9 giorni ago | 0

| accepted

Answered

load x,y

Try this: x = 1:10; y1=[0.5 1.7 1.75 1.9 2 2.1 2.4 2.6 2.7 2.9 ] y2=[0.7 1.8 1.9 2 2.3 2.5 2.7 2.8 2.9 3] save('XYvectors...

load x,y

Try this: x = 1:10; y1=[0.5 1.7 1.75 1.9 2 2.1 2.4 2.6 2.7 2.9 ] y2=[0.7 1.8 1.9 2 2.3 2.5 2.7 2.8 2.9 3] save('XYvectors...

9 giorni ago | 0

| accepted

Answered

Drawing contour on circle with individual(x,y,z) location spots

Use the contour function. If they are not already gridded (in a regularly-spaced 2D array), use the griddata (or related func...

Drawing contour on circle with individual(x,y,z) location spots

Use the contour function. If they are not already gridded (in a regularly-spaced 2D array), use the griddata (or related func...

9 giorni ago | 0

| accepted