[Eeglablist] timef winsize and padratio variables

Brian Roach Brian.Roach at yale.edu
Mon Sep 18 08:21:03 PDT 2006


Dear EEGlab users,

I have a question about a few optional input arguments to the timef 
function in eeglab.  In the timef.m file, where the matlab fft function is 
called, the usage is fft(x,n) where x is an array equal to all the 
frequencies at a particular time point (we are looping through 1:timesout) 
and n is equal to the padratio * the fft window size (winsize).  The actual 
line of code is:
tmpX = fft(tmpX,g.padratio*g.winsize);

I am wondering, does the padratio actually increase the size of the fft 
window?  The comments from

 >>help fft

imply that the second argument in fft(x,n) is the window size.  This would 
mean that the FFT window used by timef is not actually equal to the 
winsize, but the winsize*padratio.  That can be a big difference, depending 
on how large the padratio.  Is that actually true?  If so, why does the 
command line spit out "results are oversampled N times" where N = 
padratio?  Are the results actually oversampled or is the FFT window size 
just that much larger?  I understand that the larger the padratio, the more 
frequency output bins returned (and the smaller these are), but if the 
padratio does not just make the fft window larger, what is it doing and why 
would it not always be set to 1?

thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20060918/15dfd978/attachment.html>


More information about the eeglablist mailing list