[Eeglablist] FFT in EEG signal

arno delorme arno at ucsd.edu
Fri Sep 5 14:51:31 PDT 2008


Dear Starz,

If X is the data, nfft the size of the FFT window and srate the  
sampling rate. The formula below will do all channels at once if they  
are in the first dimension.

     tmp   = fft(X, nfft, 2);
     f     = linspace(0, srate/2, size(tmp,2)/2);
     f     = f(2:end); % remove DC (match the output of PSD)
     tmp   = tmp(:,2:size(tmp,2)/2,:); % the FFT decomposition is  
symmetrical
     res   = 10*log10(mean(abs(tmp).^2,3));
     figure; plot(f, res);

best,

Arno

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20080905/69d433fa/attachment.html>


More information about the eeglablist mailing list