FFT Peak at Zero

10 vues (au cours des 30 derniers jours)
Matlab1364
Matlab1364 le 29 Mar 2019
Commenté : Mohamad Mossad le 10 Déc 2019
Hello,
I am trying to plot the FFT for a data set I have. I keep getting a peak around zero and have problem with filtering. I also tried the detrend function, but I still don’t get a nice plot. I have attached my data set. I am planning to calculate FFT for the “roll” column from my data set. I appreciate your help.
  2 commentaires
dpb
dpb le 29 Mar 2019
The zero component in the FFT corresponds to the DC component of the signal...to remove, subtract mean(roll)
Image Analyst
Image Analyst le 29 Mar 2019
Just what I was going to say, so put it down in the Answers section so you can get credit for it.

Connectez-vous pour commenter.

Réponses (1)

Catalytic
Catalytic le 29 Mar 2019
Modifié(e) : Catalytic le 29 Mar 2019
Apply fftshift to your spectrum to see it with DC centered in the plot.
x=csvread('230.csv',1,0);
rollSpectrum=fftshift(fft(x(:,2)));
plot(abs(rollSpectrum))
  1 commentaire
Mohamad Mossad
Mohamad Mossad le 10 Déc 2019
about 8 months later, thanks :)

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by