Answered
turning functions into floating-point numbers
Your question lacks detail. If you have an expression in one or more variables, you can express it as a function (most likely a...

6 years ago | 0

Answered
need help on nomenclature, Simplify symbolic variables
If simplify is not simplifying to the extent that you want it to, use the Steps name-value pair to tell it to keep simplifying u...

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 2

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

6 years ago | 0

| accepted

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

6 years ago | 1

| accepted

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

6 years ago | 1

| accepted

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

6 years ago | 0

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

6 years ago | 0

| accepted

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

6 years ago | 0

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 1

| accepted

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

6 years ago | 1

| accepted

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

6 years ago | 1

| accepted

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

6 years ago | 0

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 2

| accepted

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

6 years ago | 2

| accepted

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

6 years ago | 0

| accepted

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

6 years ago | 0

| accepted

Load more