Answered
Hi !!! what is wrong in my code ??
It appears to run without error and gives what I consider the appropriate result. What problems are you having with it? ...

6 years ago | 0

Answered
error using std (used to work and works on other people's computer)
My guess is that you have variables named ‘std’ and ‘var’. Check that by running these in a script of your Command Window: ...

6 years ago | 0

Answered
A quick question about signal processing- EMG alignment of signal and spikes -
I have no idea what your signal is, however Positioning a cutted signal from a ECK Signal could provide appropriate guidance. ...

6 years ago | 0

Answered
Total energy in Time and Frequency Dimain
If you have R2018a or later, and the Signal Processing Toolbox, use the bandpass function to selectively filter the frequencies-...

6 years ago | 1

| accepted

Answered
How do I apply variables with many values to my equations
The ‘theta_dot’ calculation uses all the values. It just doesn’t do what you want it to do, since you correctly did element-wis...

6 years ago | 1

| accepted

Answered
Function solving for y
After making sure that all the arguments are present in your workspace, try this: y=fsolve(@(y)cdepth(Rh,theta1,y,Ax),k); Tha...

6 years ago | 0

Answered
How to plot only certain values in a surface plot?
Two options: 1. Set Z > 4 to NaN: [X,Y] = meshgrid(-5:.2:5); Z = -0.15*sin(X).*(X) + 0.2*(...

6 years ago | 2

| accepted

Answered
Identifying variables in an imported csv file
I have absolutely no idea what you’re describing. I assume that you have a .csv file with the variable names as the first row...

6 years ago | 0

Answered
X-label additional text automatically.
Try something like this: x = 1:10; y = randn(1,10); figure plot(x,y) xlabel('Frequency [Hz]') text(max(xlim), min(yli...

6 years ago | 0

| accepted

Answered
Subscript indices must either be real positive integers or logicals.
Assuming that you are not using the Symbolic Math Toolbox, try this: f = @(x) x.^2-3*x+2; %function we are solving See t...

6 years ago | 0

Answered
Can someone please help solving this question ?
I like to use kaiserord and fir1 for these problems. Use freqz to plot the Bode plot of the filters. I leave the rest to you...

6 years ago | 0

| accepted

Answered
Why is the plot blank ?
Except for the first element, all the vectors are NaN. Those don’t plot. (If you plot using only a marker, you would see only ...

6 years ago | 0

| accepted

Answered
matlab commands/functions yearly
The Release Notes documentation section has all the changes for every recent release for MATLAB and the Toolboxes.

6 years ago | 1

| accepted

Answered
How to obtain transfer function coefficients from data plot?
‘Is there any way I can get these two sets of data on the same continous time domain?’ Use the Signal Processing Toolbox resa...

6 years ago | 1

Answered
ode45 too many input arguments
To use your original construction, the single quotes are no longer acceptable.. Instead: [x y]=ode45(@ec1L10,0:0.25:4,2); ...

6 years ago | 2

| accepted

Answered
How do I store each iteration of my for loop in a vector?
Subscript ‘x’: for k=0:1:23 x(k+1) = 100*sqrt(2)*cos(2*pi*60*(k/1440) +(pi/4)); end however the loop is not necessary: ...

6 years ago | 0

| accepted

Answered
How to find the number of poles for an FFT?
Actually, if you have the Fourier transform of a transfer function, you can determine the number of poles and zeros by plotting ...

6 years ago | 0

| accepted

Answered
How can i delete certain numbers of an array
One approach: w = linspace(0 , pi , 260); we = w((w < 0.4*pi) | (w > 0.5*pi)); % ‘w’ Edited .

6 years ago | 0

Answered
Plot Measuring Results with ERRORBAR
I would do something like this: Test_01=[1 2 3 4 5 6]; Test_02=[1.5 2.5 3.5 4.5 5.5 6.5]; Test_03=[0.5 1.5 2.5 3.5 4.5 5.5];...

6 years ago | 0

Answered
how to filter excel data into constant time intervals and interpolate missing values
Use the Signal Processing Toolbox resample function. If you are doing signal processing, this is the only function that will pr...

6 years ago | 0

Answered
Combining duplicate data point in a data array wile keeping corresponding data
What do you want to do with your data? Unless the function you want to use them with requires unique data for ‘x’ (I see othe...

6 years ago | 0

| accepted

Answered
Problem with a function tf
Run these from a script or your Command Window: restoredefaultpath rehash toolboxcache and try using tf again. If it st...

6 years ago | 0

Answered
plotting one variable function
Another approach: sRi(1) = fsolve(@(Ri) (1+Ri)./(2*(1-Ri)) - 2, 0.01); sRi(2) = fsolve(@(Ri) (1+Ri)./(2*(1-Ri)) - 25, 0.01);...

6 years ago | 2

Answered
Mean and Root Mean Square plot
Try this: Time = 0:0.001:5; T = Time(2)-Time(1); % Sampling period Fs = 1/T; % Sampling f...

6 years ago | 0

| accepted

Answered
Accurate rise time with stepinfo()
From the documentation for stepinfo: RiseTime — Time it takes for the response to rise from 10% to 90% of the steady-state res...

6 years ago | 0

| accepted

Answered
Using ode45 To Solve a System of 2nd Order ODEs
Code them in the Symbolic Math Toolbox, and use the functions odeToVectorField and then matlabFunction to create an anonymous fu...

6 years ago | 0

| accepted

Answered
Can I set MarkerFaceColor to part of the data points?
Yes! figure plot(1:10, 1:10, 's') hold on plot((1:3), (1:3), 'sr','MarkerFaceColor','r') hold off .

6 years ago | 0

| accepted

Answered
why i get this ERROR???
I suspect it is because ‘(2*n-1)’ is less than or equal to 0. I have no idea what ‘n’ is, so it could also be the problem if ...

6 years ago | 0

Answered
Error using interp1
The error is straightforward — the first and second argument vectors must be the same length. They can be different sizes, so o...

6 years ago | 1

Answered
IFFT complex numbers are wrong
Those numbers (indices 1 and 401) are likely the D-C (or constant) values of the Fourier transform. The entire vector will be c...

6 years ago | 0

Load more