[Eeglablist] timef winsize and padratio variables

Scott Makeig smakeig at gmail.com
Wed Sep 27 05:58:33 PDT 2006


Brian -

The 'padratio' argument multiplies the length of the FFT but not of
the data used. Rather, the tapered data window is extended with zeroes
on either end. This gives increase frequency resolution in one sense
(intermediate frequencies are tested and plotted, resulting in
smoother time/freq plots and more accurate protrayal of e.g. a
frequency peak), but not in another sense (it doesnt allow two quite
closely spaced frequency peaks to be any better separated).

Scott Makeig

On 9/18/06, Brian Roach <Brian.Roach at yale.edu> wrote:
>
>  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
>
> _______________________________________________
> eeglablist mailing list eeglablist at sccn.ucsd.edu
> Eeglablist page:
> http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
>
>



More information about the eeglablist mailing list