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 entire input with 4096-points FFT

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


[2] Divide the input into 8 segments (4096/8=512 data point each), and feed each segment to 512-points FFT, and then average the output:

N = length(input);
Y = zeros(1,512);
for i = 1:8
  segment = input(512*(i-0)+1 : 512*i);
  Y = Y + abs(fft(segment,512))/512/8;
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?
Question #1: Are these 2 methods equivalent?


No, method #1 is taking an FFT of the entire sequence resulting in frequency bin widths of fs/N = 1024/4096 = 0.25 Hz. Method #2 is summing shorter FFTs at a frequency resolution (bin width) of 1024/512 = 2.0 Hz. For #2, if you divide by the number of FFTs after you sum them you are then averaging them. This is often times used to reduce the variance of the result.


  Question #2: Is the frequency resolution for both methods equal to 0.25Hz per bin?


No, they are 0.25 &amp; 2.0 Hz. The resolution, or bin width, of the FFT is fs/N.