답변 있음

create yyyymm variable from date

Try this: dt = '1/1/2020'; Out = datetime(dt, 'InputFormat','MM/dd/yyyy', 'Format','yyyyMM') producing: Out = dateti...

create yyyymm variable from date

Try this: dt = '1/1/2020'; Out = datetime(dt, 'InputFormat','MM/dd/yyyy', 'Format','yyyyMM') producing: Out = dateti...

5일 전 | 0

| 수락됨

답변 있음

Resampling Data using Interp1

You are doing signal processing. For that, use the resample function. It will do the interpolation, and will also use an anti-...

Resampling Data using Interp1

You are doing signal processing. For that, use the resample function. It will do the interpolation, and will also use an anti-...

5일 전 | 0

답변 있음

Can ode45 be used to solve mx'' + cx' + kx^1.1=0 x(0)=5;x'(0)=0? Getting complex numbers in answers.

You need to plot the real and complex parts separately. Assuming: [t,y] = ode45(yourOdefcn, tspan, ic); plot it as: fig...

Can ode45 be used to solve mx'' + cx' + kx^1.1=0 x(0)=5;x'(0)=0? Getting complex numbers in answers.

You need to plot the real and complex parts separately. Assuming: [t,y] = ode45(yourOdefcn, tspan, ic); plot it as: fig...

5일 전 | 0

| 수락됨

답변 있음

How to show numeric solution instead of symbolic solution

The ‘q_dot’ variable cannot be expressed as a strictly numeric array because it contains symbolic variables. The best you can...

How to show numeric solution instead of symbolic solution

The ‘q_dot’ variable cannot be expressed as a strictly numeric array because it contains symbolic variables. The best you can...

5일 전 | 0

| 수락됨

답변 있음

Jacobian matrix of a numeric matri

See if the gradient function will do what you want. That is likely as close as you can get for a numeric matrix. If it is a ...

Jacobian matrix of a numeric matri

See if the gradient function will do what you want. That is likely as close as you can get for a numeric matrix. If it is a ...

6일 전 | 0

답변 있음

Second Order ODE with Power

The best way to integrate it numerically is something like this: syms x(t) A B C D vb b Y t v=diff(x,t,2)==(A/x)*(B+C*(diff(...

Second Order ODE with Power

The best way to integrate it numerically is something like this: syms x(t) A B C D vb b Y t v=diff(x,t,2)==(A/x)*(B+C*(diff(...

6일 전 | 0

| 수락됨

답변 있음

Running data through a filter multiple times

It is not easy to follow what you are doing here, especially with respect to your using the strings as part of the subscript (th...

Running data through a filter multiple times

It is not easy to follow what you are doing here, especially with respect to your using the strings as part of the subscript (th...

6일 전 | 1

| 수락됨

답변 있음

How to correctly apply bandpass filter to EEG data?

The bandpass function (and its friends) in my experience have all used filtfilt to do the actual filtering, so there should not ...

How to correctly apply bandpass filter to EEG data?

The bandpass function (and its friends) in my experience have all used filtfilt to do the actual filtering, so there should not ...

6일 전 | 0

답변 있음

findpeaks returns wrong width

If you have the Signal Processing Toolbox, use the pulsewidth function for this: D = readmatrix('test.csv'); A1 = D(:,2); t1...

findpeaks returns wrong width

If you have the Signal Processing Toolbox, use the pulsewidth function for this: D = readmatrix('test.csv'); A1 = D(:,2); t1...

7일 전 | 0

| 수락됨

답변 있음

genetic algorithm for curve fitting

I would do something like this (with ‘M’ and the constants already existing in your workspace): MFit = @(c0,M0,h,z,z0) (M0 + c...

genetic algorithm for curve fitting

I would do something like this (with ‘M’ and the constants already existing in your workspace): MFit = @(c0,M0,h,z,z0) (M0 + c...

7일 전 | 1

| 수락됨

답변 있음

remove first value that appears after sequence of NaNs

Try this: D = readmatrix('example_data.xlsx'); R01 = strfind(isnan(D(:,1)).', [1 0]); % Find Indices Of [0 1...

remove first value that appears after sequence of NaNs

Try this: D = readmatrix('example_data.xlsx'); R01 = strfind(isnan(D(:,1)).', [1 0]); % Find Indices Of [0 1...

7일 전 | 1

| 수락됨

답변 있음

I am trying to find the average of a 58 x 1000 matrix and the result should be a 58 X 48 matrix.

I am not certain that what you want to do is possible. I would normally suggest using reshape with it, then take the mean of ea...

I am trying to find the average of a 58 x 1000 matrix and the result should be a 58 X 48 matrix.

I am not certain that what you want to do is possible. I would normally suggest using reshape with it, then take the mean of ea...

7일 전 | 0

답변 있음

matrix dimension mismatch problem

The assignment to ‘Rb’ appears to be missing. Since you are using element-wise division wih it, it appears to be a vector, so I...

matrix dimension mismatch problem

The assignment to ‘Rb’ appears to be missing. Since you are using element-wise division wih it, it appears to be a vector, so I...

8일 전 | 0

답변 있음

confusion regarding interp1 command?

The two methods do not produce exactly the same results, however with respect to the amplitude of the values in the plot, they o...

confusion regarding interp1 command?

The two methods do not produce exactly the same results, however with respect to the amplitude of the values in the plot, they o...

8일 전 | 0

| 수락됨

답변 있음

Allow Maximum frequency in FFT to be lower than the sampling frequency

The maximum frequency for a sampled signal is the Nyquist frequency, half the sampling frequency. Here: Fs = 262144; Fn = ...

Allow Maximum frequency in FFT to be lower than the sampling frequency

The maximum frequency for a sampled signal is the Nyquist frequency, half the sampling frequency. Here: Fs = 262144; Fn = ...

8일 전 | 0

답변 있음

How to find the integral of some values?

use the trapz (or cumtrapz) function (depending on the result you want). It would be best to also have an independent variable ...

How to find the integral of some values?

use the trapz (or cumtrapz) function (depending on the result you want). It would be best to also have an independent variable ...

8일 전 | 0

| 수락됨

답변 있음

How can I bring patch in front of a surface plot?

The patch call does not define the ‘Z’ level, so by default it is zero. Change that to put it where you want it (this puts it a...

How can I bring patch in front of a surface plot?

The patch call does not define the ‘Z’ level, so by default it is zero. Change that to put it where you want it (this puts it a...

9일 전 | 0

| 수락됨

답변 있음

Enzymatic reaction modeling in MATLAB

You are not actually estimating parameters, however the example in: Parameter Estimation for a System of Differential Equations ...

Enzymatic reaction modeling in MATLAB

You are not actually estimating parameters, however the example in: Parameter Estimation for a System of Differential Equations ...

9일 전 | 0

| 수락됨

답변 있음

Growth kinetics ODE 15

The problem is here: Il=Io*exp(-sigma*x*l); since ‘x’ (and therefore ‘Il’) is a (7x1) vector, and it creates the right-hand-s...

Growth kinetics ODE 15

The problem is here: Il=Io*exp(-sigma*x*l); since ‘x’ (and therefore ‘Il’) is a (7x1) vector, and it creates the right-hand-s...

9일 전 | 1

| 수락됨

답변 있음

using surf and pol2cart on matrix

The matrix you have is actually the ‘Z’ matrix. You need to create separate radius and angle matrices of the same size (use ndg...

using surf and pol2cart on matrix

The matrix you have is actually the ‘Z’ matrix. You need to create separate radius and angle matrices of the same size (use ndg...

10일 전 | 1

| 수락됨

답변 있음

Remove the legends for some lines in a plot

‘How can I get rid of those extra lines in the legend box?’ Refer only to the scatter plots by handle reference: LT = 0.5:9...

Remove the legends for some lines in a plot

‘How can I get rid of those extra lines in the legend box?’ Refer only to the scatter plots by handle reference: LT = 0.5:9...

10일 전 | 0

| 수락됨

답변 있음

If ode 45 uses internal step size then what is the utility to use delta T in the code?

I have no idea what you are asking. See if the documentaiton on tspan explains it.

If ode 45 uses internal step size then what is the utility to use delta T in the code?

I have no idea what you are asking. See if the documentaiton on tspan explains it.

10일 전 | 0

답변 있음

How to avoid undercase in plot legend?

Try this: legend('003_m1_30_90_ramp_20200611_200632_SNR_F1_PLL.mat', 'Interpreter','none') It ‘turns off’ the existing interp...

How to avoid undercase in plot legend?

Try this: legend('003_m1_30_90_ramp_20200611_200632_SNR_F1_PLL.mat', 'Interpreter','none') It ‘turns off’ the existing interp...

11일 전 | 0

| 수락됨

답변 있음

Solving System of Differential Equations with Multiple Variables using ode45

If you assign ‘A(t)’ as ‘x(1)’ ... ‘F(t)’ as ‘x(6)’, then an anonymous function version would create this matrix: dfcn = @(t,x...

Solving System of Differential Equations with Multiple Variables using ode45

If you assign ‘A(t)’ as ‘x(1)’ ... ‘F(t)’ as ‘x(6)’, then an anonymous function version would create this matrix: dfcn = @(t,x...

11일 전 | 0

| 수락됨

답변 있음

How separate data from a table and convert every column in vector if this seáration depends on the label 'D' or 'E'?

Try this: C = { 111 90 50 'D' 321 80 50 'E' 121 70 ...

How separate data from a table and convert every column in vector if this seáration depends on the label 'D' or 'E'?

Try this: C = { 111 90 50 'D' 321 80 50 'E' 121 70 ...

11일 전 | 0

| 수락됨

답변 있음

Hi how do i plot a halfwave rectifier signal in matlab? i tried the coding below and only got the fullwave

To rectify it, use logical indexing to eliminate the parts of the signal that are less than 0: f=50; t=linspace(0,30,500); s...

Hi how do i plot a halfwave rectifier signal in matlab? i tried the coding below and only got the fullwave

To rectify it, use logical indexing to eliminate the parts of the signal that are less than 0: f=50; t=linspace(0,30,500); s...

11일 전 | 0

| 수락됨

답변 있음

Convert Datetime to UTC

Try this: T = datetime('now', 'Format','yyyy MM dd HH mm ss', 'TimeZone','local') % Local Time Zone T.TimeZone = 'Z' ...

Convert Datetime to UTC

Try this: T = datetime('now', 'Format','yyyy MM dd HH mm ss', 'TimeZone','local') % Local Time Zone T.TimeZone = 'Z' ...

11일 전 | 1

| 수락됨

답변 있음

How to include quiver plot in this 3d surface plot?

Try this: (EARLIER CODE OMITTED) figure surf(x,y,z1); xlabel('\bf{x}','fontsize',10); ylabel('\bf{y}','fontsize',10); z...

How to include quiver plot in this 3d surface plot?

Try this: (EARLIER CODE OMITTED) figure surf(x,y,z1); xlabel('\bf{x}','fontsize',10); ylabel('\bf{y}','fontsize',10); z...

11일 전 | 0

| 수락됨

답변 있음

Converting time variable in excel into datetime datatype

Assuming the date format and that the rows are character arrays, try this: dtc = '20190101:1700'; dt = datetime(dtc, 'InputFo...

Converting time variable in excel into datetime datatype

Assuming the date format and that the rows are character arrays, try this: dtc = '20190101:1700'; dt = datetime(dtc, 'InputFo...

12일 전 | 0

| 수락됨

답변 있음

Semilog x axis for Scatter Plot

The plot is working correctly. To more easily see that it is, add this xlim call (temporarily): xlim([0.01 10]*1E+5) .

Semilog x axis for Scatter Plot

The plot is working correctly. To more easily see that it is, add this xlim call (temporarily): xlim([0.01 10]*1E+5) .

12일 전 | 0

| 수락됨