How do I plot an FFT of a large data set?
Show older comments
I have a very large data set that I am trying to use to plot a FFT. The sampling frequency is 20000 and there are 555201 data points. My code is not giving me an accurate graph for figure 2, the plot of the FFT.
Here is my code:
filename = 'Sample192.xlsx';
T = readtable(filename);
x = T{1:555201,1};
y = T{1:555201,2};
%
figure(1)
plot(x,y);
%
Y = fft(y);
Fs = 20000;
f = (0:length(Y)-1)*(Fs/length(Y));
figure(2)
plot(f,abs(Y))
3 Comments
Angelica Black
on 9 Dec 2021
Mathieu NOE
on 9 Dec 2021
hello
can you share the data file as well ?
tx
Angelica Black
on 9 Dec 2021
Accepted Answer
More Answers (0)
Categories
Find more on Vibration Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!