0
$\begingroup$

For example, there is a very long-term observation and I cut the signal at a sampling rate of 10 into many segments of 1e6-point length. I wanna check the time-varying characteristics of the spectrum, so I fft each segment and compare their spectrum.

When doing the fft for each 1e6-point segment, in case of y = fft(x, 2^nextpow2(1e6)=1048576), we get the spectrum at freqs = 0 : 9.5367e-06 : 5 Hz. But it's time-consuming and I don't wanna store such big data.

So what if y = fft(x, 1024)? Do I get the CORRECT spectrum for freqs = 0 : 0.0098 : 5 Hz?

$\endgroup$
2
  • $\begingroup$ Depends on whether or not the signal is stationary, and what kind of result you are looking to get from using an FFT. $\endgroup$
    – hotpaw2
    Sep 28 '15 at 16:38
  • $\begingroup$ @hotpaw2 I modified the question and added some details. $\endgroup$
    – ddzzbbwwmm
    Sep 28 '15 at 17:06
1
$\begingroup$

As per the Matlab help, y = fft(x, 1024) where length(x) > 1024 will result in just taking the FFT of x(1:1024).

enter image description here

So if talking the FFT of just the first 1024 samples of your 1,000,000 point signal is OK, then sure, what you say is correct.

$\endgroup$
0
0
$\begingroup$

The simple answer to your question, if I'm understanding you correctly, is yes. If you take an FFT of length 1024 with a sample rate of 10, you would get frequency bins spaced roughly 0.0098 Hz apart.

Now your question about whether this is reliable is a bit subjective; it depends on what kind of frequency resolution you need. The shorter your FFT size, the worse your frequency resolution gets. Basically, you should pick the shortest FFT size that allows you to extract the information you need from the spectral data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.