Answered
Converting discrete signal to frequency domain
The fft calculation an plotting is straightforward. (You can also use the pspectrum function and others.) Fs = 100; Fn = Fs...

4 years ago | 0

| accepted

Answered
Matlab 2015a Script to solve the equation w=-tan(0.8*w)
Use vpasolve with an initial value (or range of values as described in Specify Ranges of Solutions) — syms w EQ = w + tan (0....

4 years ago | 0

| accepted

Answered
Please explain this code about differential equations.
They refer to the function values returned by ode45 (in this code). y(1) is y(2) is y(3) is That can easily be inferre...

4 years ago | 0

Answered
divide a string every 15 characters
Try this — A = ["+6.64430238e+00+1.14987825e-02-4.68099585e-06+9.62334222e-10-8.24360065e-14"]; B = string(reshape(char(A),15...

4 years ago | 1

| accepted

Answered
Trigonometric non linear equation
Try something like this — theta=30; k=360; h=0.5555; F = @(h) ((cosd(theta).*(sind(k*h).^2)) - (2*(sind(k.*h.*cosd(theta))....

4 years ago | 0

| accepted

Answered
How do I hyphen a word using LaTex?
It appears to work as written — figure xlabel("multi-disciplinary", 'Interpreter','latex') Do you want a different result? ...

4 years ago | 0

Answered
Arrays have incompatible sizes for firpm() function.
The ‘frequency’ and ‘response’ vectors must be the same lengths, and they must have even numbers of elements (according to the d...

4 years ago | 0

| accepted

Answered
Fitting a curve (not a surface) for set of 3d points
I have no idea what model you want to fit to the data. This does a linear regression — A = [-27.9887180593615 -1340.7554656...

4 years ago | 0

| accepted

Answered
Using plot with dates stored in a cell array
I get a different result — i = 1; dates{i} = '1/22/20'; dtv = datetime(dates{i}, 'InputFormat','MM/dd/yy') That appears to ...

4 years ago | 0

| accepted

Answered
How do I save multiple PCA results in a cell array? Error: Brace indexing not supported
I am not certain what the problem is. This runs without error for me, and produces the appropriate result — LD = load('pre...

4 years ago | 0

| accepted

Answered
Needing help using ode15s to solve an equation.
I find it easiest to let the Symbolic Math Toolbox do all the heavy lifting — syms C(t) C_in C_0 Q_in Q_out t V_0 Y DE = (V_...

4 years ago | 1

| accepted

Answered
help plot of function using handle
Call ‘G’ with its argument — b1 =1 b2 =2 b3 =3 b4 = 4 % Replace Missing Value %------...

4 years ago | 1

| accepted

Answered
Numerical Fourier transforms of matrix?
I have no idea what you want. I would not suggest integrating the individual sine and cosone coefficients using numerical integ...

4 years ago | 0

| accepted

Answered
Can I use an anonymous function as an input to a regular function
I am not certain what you are doing. Try this — anon = @(x) x+3; y = hello(3,anon) function y = hello(input1,fcn) ...

4 years ago | 0

Answered
How do I keep f as a variable in a state space model, as f is supposed to be the input variable??
Since ‘f’ is only defined in ‘B_motor’ simply create an anonymous function from it, and then from ‘motor_ss’ (to keep with the e...

4 years ago | 0

| accepted

Answered
Using splitapply to add a column to a table
I am not certain what result you want. Try this — Tickers = ["AAPL"; "AAPL"; "AAPL"; "MSFT"; "MSFT"; "MSFT"]; MonthlyRetur...

4 years ago | 0

| accepted

Answered
Frequency domain to Time domain
The acceleration data must be complex, or the data must consist of an acceleration magnitude and an acceleration phase. The hig...

4 years ago | 1

| accepted

Answered
How to add an accent mark in a label of a graph when using latex interpreter?
The acute accent is coded as \' (‘escaped’ apostrophe) so within a quoted character array it has to be \'' — figure xlabel('\...

4 years ago | 1

| accepted

Answered
Why am I not getting values for my step response transfer function using stepinfo
Thjere are two poles in the right-half plane, so the system is unstable — num=[100, 301, 201]; den=[125, 125, -61, 40]; sys=...

4 years ago | 1

Answered
Interpolation on same number of samples after FIR filtration
Filtering should not change the signal length. I am not certain exactly what you are doing, how your designed your FIR filter...

4 years ago | 0

| accepted

Answered
Finding global maxima and minima of a matrix row
This can be done easilly with the max and min functions. For the dimension argument use 'all'.

4 years ago | 0

Answered
Inconsistent type following cell2table
Use parentheses, not curly braces, to index into a vector within a cell — test = {[1, 2], [nan]; [nan], [nan]; [nan], [nan]}; ...

4 years ago | 1

| accepted

Answered
Need help with ODE parameter estimation
I appreciate your compliment! There are a number of SIR models posted that estimate parameters from data. Modify this kine...

4 years ago | 0

Answered
Why is my power spectrum like this?
‘It would also be helpful to note these are electrically stimulated contractions using a functional electrical stimulator. The s...

4 years ago | 1

| accepted

Answered
When using fplot I get: Index exceeds the number of array elements. Index must not exceed 1.
For symbolic expressions, just use the expressions themselves, not annonymous function representations of them. m=0.5819; kc...

4 years ago | 0

| accepted

Answered
How to compare values of two vectors?
One option could be the setdiff function, another could be ismember — vec1= [10 20 30 40 50]; % transmission vec2= [10 20 30 ...

4 years ago | 0

| accepted

Answered
How to split a table column into two seperate columns
The regexp function works with cell arrays easily — C = {'AIVA-100\something'; 'AIVA-75\something else'}; Cs = regexp(C,'\'...

4 years ago | 0

| accepted

Answered
What determines the maximum frequency when taking the FFT?
The maximum is the Nyquist frequency, since that is the highest frequency that is uniquely resolvable in a sampled signal. I ...

4 years ago | 0

Answered
Matlab function freqz gives wrong amplitude in dB
I do not see any call to freqz, or the designed filter, so I cannot test this. What you are seeing may be a frequency-axis re...

4 years ago | 0

Answered
Group matrix with this condition
Using accumarray and mat2cell — A = [1 92.1433186490000 23.9154939160001 1 92.9534543080001 23.9122345640001 1 92....

4 years ago | 1

| accepted

Load more