Answered
How can I animate springs in MATLAB?
One approach — L = 1600; % Vector Lengths t = linspace(0, 16*pi-(1/L), L); ...

3 years ago | 0

| accepted

Answered
differentiate between month in dataset.
Perhaps something like this — secondsperyear = 60*60*24*365; DT = datetime(2023,1,1,0,0,0) + seconds(0:secondsperyear-1).'; ...

3 years ago | 0

Answered
To obtain the cumulative signal power spectrum from the single-sided spectrum of a biomechanical signal to identify the frequency under which 99% of the signal power is
I cannot find a time vector or sampling frequency. I need at least one of those. The article is open-source, however not ill...

3 years ago | 1

| accepted

Answered
Using rlocus I am confused
You appear to be overthinking it. Try this — G = tf([1 1], conv([1 2 2], [1 2 5])); figure rlocusplot(G) grid % title...

3 years ago | 0

| accepted

Answered
nlarx is not working at all
Check to see if you have another function (or something else) with the same name. To do that, run this: which nlarx -all f...

3 years ago | 0

| accepted

Answered
Why am I getting the same colour of the legend for the last 2 plots?
I suspect that it is because ‘y2’ has more than one row. The solution is to return the handles of the plots, and select only ...

3 years ago | 0

| accepted

Answered
Choosing dimension for filter
I believe so. From the filtfilt documentation for x: ‘The function operates along the first array dimension of x unless x i...

3 years ago | 0

Answered
How to draw the delta signal in matlab
The function normally will not plot in MATLAB because it has infinite amplitude and infinitesimal width. So it is necessary ...

3 years ago | 0

Answered
Problem during the use of 'fzero'
I am not certain what you want to do. I suspect that you want to loop over varying values of ‘t’ however ‘t’ never appears as...

3 years ago | 1

| accepted

Answered
Extracting datetime and adding reference time
This was a bit more involved than I theught it would be — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uplo...

3 years ago | 0

Answered
3 subplots with the bottom one split in 2 vertically?
Perhaps this — clearvars x = -10:0.01:10; y = cos(x); figure(1) subplot(2,2,[1 2]) plot(x, y) subplot(2,2,3) plot(x,...

3 years ago | 0

| accepted

Answered
Why is my "plot" function not working?
Use the str2double function on the last four variables. EDIT — (26 Mar 2023 at 10:28) T = readtable('https://www.mathworks...

3 years ago | 0

| accepted

Answered
what test to use on z-scores
Since the zscore is simply a standardised method of expressing data, and if the mean values and standard deviation (std) values ...

3 years ago | 0

| accepted

Answered
Using the surf and meshgrid command
I am not certain what function you want to plot, since you did not create ‘z’ as a separate matrix. (I am creating it here in p...

3 years ago | 0

| accepted

Answered
How do I save a data in my excel to matlab folder, i e how do i create a path to matlab folder
I am not certain whether you want to read from the Excel file or write an Excel file from data you have created. Depending on...

3 years ago | 0

| accepted

Answered
Displacement from acceleration measurements
The slopes are due to a constant that is being integrated can be removed by subtracting the mean of the variable to be integrate...

3 years ago | 0

Answered
Change rlocus() axis units to Hz?
First, use rlocusplot since it allows options — sys = tf([2 5 1],[1 2 3]); hrlp = rlocusplot(sys); opts = getoptions(hrlp) ...

3 years ago | 1

| accepted

Answered
Problems with signal processing
For a time-frequency plot, I would use the pspectrum function with the 'spectrogram' option, at least for an initial approach, a...

3 years ago | 0

Answered
Plotting Level Curves after function
Use the contour function. You can use fcontour, however it will not be possible to export its results to plot with contour. ...

3 years ago | 0

Answered
How can I line up plot edges in subplots?
I was hoping that the 'Position' (actually 'InnerPosition') of the first and last subplot axes would automatically be set correc...

3 years ago | 0

| accepted

Answered
Sine curve fitting in MATLAB
@M — I was in the process of answering this when Win 11 crashed. Again. For the fifth time in two days, and three times when I...

3 years ago | 0

Answered
why am I getting the error "Incorrect number or types of inputs or outputs for function 'solve'."
For equality inside a symbolic expression, use double equal signs (==) — syms d e s=solve(7*d + 3*e == 71,d + 2*e == 20); s...

3 years ago | 0

| accepted

Answered
Plot complex signal with imaginary and complex
This is relatively straightforward — Fs = 1000; Tlen = 10; t = linspace(0, Tlen*Fs, Tlen*Fs+1)/Fs; s = exp(1j*t*2*pi); R...

3 years ago | 0

| accepted

Answered
Plotting 3D by rotate 2D plot around y-axis
Probably the easiest way is to define a cylinder and a shape vector — yv = [linspace(0.3, 1, 50)]; ys1 = yv.*exp(-1.75*yv)*5;...

3 years ago | 2

| accepted

Answered
Unable to find symbolic solution
The system is nonlinear, so it quite likely does not have an analytic solutioon. Try something like this— syms y(x) x Y D...

3 years ago | 0

| accepted

Answered
Using histcounts to determine loose data mode
I am not certain what you want to do. The histcounts function has a third output bin that will index into the elements that w...

3 years ago | 0

Answered
Find kinetic constants from differential equations
Some examples: Monod kinetics and curve fitting , Parameter Estimation for a System of Differential Equations , and there are s...

3 years ago | 0

| accepted

Answered
How do you indicate the order of plotted points in a polar plot?
Unforutnately, quiiver and polaraxes don’t work together. The only alternative is to create your own polar axes as Cartessian a...

3 years ago | 0

| accepted

Answered
How to calculate respiratory rate from a Doppler radar signal
Perhaps something like this — LD = load(websave('radar_signal','https://www.mathworks.com/matlabcentral/answers/uploaded_files...

3 years ago | 0

| accepted

Answered
Where to find changes in functions in Matlab versions?
See: Release Notes, however that only goes back as far as R2018a. I am not certain that other documentation exists online, alth...

3 years ago | 0

Load more