Sampling frequency in fft analysis.
Mostrar comentarios más antiguos
Dear Friends, i have daily(one day one value) data for 5 years. How to give the time (sampling frequency) in fft analysis. Here i attaching the code. Please correct it and give me suggestions. Here attaching the data also (txt), Thanking you
X=xlsread('data.xlsx');
xfft = fft(X(:,2));
n=length('enter the length of fft');
DT = X(2,1)-X(1,1);
% sampling frequency
Fs = 1/DT;
DF = Fs/size(X,1);
freq = 0:DF:Fs/2;
xfft = xfft(1:length(xfft)/2+1);
plot(freq,abs(xdft));
xlabel ('Frequency');
ylabel ('power');
title('S-fft')
1 comentario
srinivas kotta
el 16 de Oct. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Frequency Transformations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!