Skip to main content
1 of 10
cpmame
  • 41
  • 1
  • 4

FFT the whole input vs FFT segment

suppose I have a 4 seconds signal captured at $f_s$ = 1024Hz, which gives 4,096 data array. What is the different between these 2 FFT methods (MATLAB code)

[1] FFT the whole input with 4096-point FFT in one short.

N = length(input);
Y = fft(input)/N;

[2] Divide the input data into 8 segment (500 data point each), and feed each segment to 512-point FFT and combine the result:

N = length(input);
Y = zeros(1,512);
for i = 1:8
  segment = input(1+512*(i-0) : 512*i);
  Y = Y + ( abs(fft(segment,512)) / (8*N) );
end

Question #1: Are these 2 methods equivalent?

Question #2: Is the frequency resolution for both methods equal to $\frac{f_s}{N}$ = 0.25Hz per bin?

cpmame
  • 41
  • 1
  • 4