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

Answered
How to filter a sensor-measured signal to its theoretical form
Using the results of the fft, a highpass cutoff frequency of ‘0.02*Fs’ appears to be appropriate — T1 = readtable('https://w...

4 years ago | 0

| accepted

Answered
Creating table with scalars in one column and vectors in another
Try something like this — theta = [30; -15]; Dm = [1 0 -1; 0 0 -1]; Data = table(theta, Dm) .

4 years ago | 0

| accepted

Answered
why it shows no curve in this code?
The reason no plot appears is that ‘y’ is a single point, and the plot function only draws lines between pairs of points and wil...

4 years ago | 0

| accepted

Answered
Check for incorrect argument data type or missing argument in call to function 'isfinite'.
Change ‘eqs’ to be a funciton one one argument, and it works — c=8; x=9; y=10; f=@(x,y)(f1(x,y,c)+f3(x,y,c)); ff=@(x,y)f2(...

4 years ago | 0

Answered
How to detect rotation in a trajectory?
I would use the gradient function to calculate the numerical derivative. For example: dydx = gradient(y) ./ gradient(x); P...

4 years ago | 0

| accepted

Answered
Symbolically solving vectors simultaneously
One solve statement (such as in the original post) also fails in R2022a. One option to get all of the solutions is arrayfun tha...

4 years ago | 0

| accepted

Answered
How can I merge multiple cells in one row?
Try this — cell_1 = {'date', 'year', 'place'}; cell_2 = {'name', 'age', 'time'}; firstpass = cellfun(@(x)sprintf('%%d_%s',x)...

4 years ago | 1

| accepted

Answered
Not Enough Input arguments error
I suspect the problem is the ‘input’ variable, since input is a function. The solution is to rename ‘input’ to something else...

4 years ago | 0

| accepted

Answered
Fitting 4 parameters with constraints
‘But the problem is that I need to add constraints to my parameters. This is not possible using lsqcurvefit.’ Yes, it is, how...

4 years ago | 1

| accepted

Answered
How to find the probability of something from an underlying exponential distribution?
The expcdf function will be useful here. There are examples in the documentation.

4 years ago | 1

| accepted

Answered
Why does the plot of the EMG signal change like the picture when the band pass filter is applied?
The largest difference is the elimination of the baseline offset and baseline variation (‘drift’), since these are all between 0...

4 years ago | 1

| accepted

Answered
Reversing a part of matrix
A few examples of a robust approach — M=[10 20 30 40 50 60 70 80 90 100]; i=sort(randsample(10,2)) M_new = [M(1:i(1)-1) flip...

4 years ago | 0

| accepted

Answered
Triple integral of symbolic function
Try this — syms phi r theta r0 r1 phi0 phi1 theta0 theta1 sympref('AbbreviateOutput',false); func(r,phi,theta) = r.^2.*sin...

4 years ago | 0

Answered
How can I compute the mean of a cell matrix with different size ?
Try something like this — R = {rand(10,8)} Rmeanc = cellfun(@mean,R, 'Unif',0) Rmeanv = Rmeanc{:} .

4 years ago | 0

| accepted

Answered
For loop, Brace indexing is not supported for variables of this type.
The ‘All_Values’ matrix is not a cell array, so you cannot use cell array indexing for it. (I am not exactly certain what it co...

4 years ago | 0

| accepted

Answered
i keep getting an error for the messagebox.
The ‘name’ variable is a cell array, so it must be addressed as such. Also, fprintf is not appropriate here, however sprintf is...

4 years ago | 0

| accepted

Load more