Finding Frequency range from Time series

1 vue (au cours des 30 derniers jours)
Chris Dan
Chris Dan le 7 Juil 2020
Hello,
I am trying to find the frequency range from the time range that I have made. I read the FFT documentation, but it is not working for my code.
spindle_speed = 960
n=1; % number of cycles
c = inv(spindle_speed/60)*n ;% maximum time limit
d = c/100; % number of steps to divide the time range
t =[0:d:c]
f = spindle_speed/60*(0:d:(c/2))/c;
This code works for a single cycle, the frequency should be
f = 1/(2*t)
But for more than 1 cycle, this code is not giving correct answers
Does anyone know?
  1 commentaire
Chris Dan
Chris Dan le 8 Juil 2020
Hey
can you help me with this....?

Connectez-vous pour commenter.

Réponse acceptée

Chris Dan
Chris Dan le 9 Juil 2020
This works for me
Fs = 1000; % Sampling frequency
T = 1/Fs; % Sampling period
L = 128; % Length of signal-63 for one cycle
t = (0:L-1)*T; % Time vector
f = Fs*(0:(L/2))/L;

Plus de réponses (0)

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by