Understanding FFT Results from Excel Data
Afficher commentaires plus anciens
I am trying to take the FFT of some data I have in excel. However the results that I am getting do not make sense to me. First, below is the plot that is generated when plotting the FFT:

The first indication to me why this does not appear to be correct is that the frequency is 0. There are two reasons why I think this could be the case (possibly both):
1) My initial conditions are incorrect due to wrong assumptions (i.e sampling period and sampling frequency)
Ts = 600; %Sampling period
Fs = 1/Ts; %Sampling frequency
L = 79; %Length of Signal
S = Data_Set; %Array of doubles
The sampling period was calcuated as I know that each point was recorded after 10 minuets for a total of 79 points. I then converted this into seconds resulting in 600. This is an immediate red flag as now my calculated sampling frequency is almost 0. How do I get around this or how do I need to think about this differnely?
2) Error in my code
L2 = 2^nextpow2(L);
ff = fft(plot_Data,L2);
fff = ff(1:L2/2);
xfft = Fs*(0:L2/2-1)/L2;
plot(xfft,abs(fff));
This is the code that I have written to generate the plot that was posted above. Any insight into my questions above would be much appreciated!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Fourier Analysis and Filtering dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
