[Eeglablist] newcrossf coherence matrix
Sacks, Annette E
sacksae at upmc.edu
Fri Aug 21 07:15:08 PDT 2009
Thanks, this was helpful. We're still not quite clear on the time bins though - is it the case that the timesout matrix gives the midpoints of the time bins, and if so, why is it that the time bins are not evenly spaced? (They seem to be shifted by 8 or 12 ms.)
Thanks again!
________________________________
From: Arnaud Delorme [mailto:arno at ucsd.edu]
Sent: Thursday, August 06, 2009 2:20 PM
To: Sacks, Annette E
Cc: 'eeglablist at sccn.ucsd.edu'
Subject: Re: [Eeglablist] newcrossf coherence matrix
On Aug 5, 2009, at 9:21 AM, Sacks, Annette E wrote:
I've been doing a channel cross-coherence analysis in EEGlab v6.01b using newcrossf() with a sampling freq of 250Hz, epoch start/end [-400 1896], and frequency range [0 100], which outputs a 102 x 200 coherence matrix. This is the call I used:
>> [coh,mcoh,timesout,freqsout,cohboot,cohangles] = pop_newcrossf(EEG, 1, 1, 2, [-400 1896], 0, 'freqs', [0 100], 'alpha', .05);
Which gives this output:
Adjust min freq. to 0.98 Hz to match FFT output frequencies Adjust max
freq. to 99.61 Hz to match FFT output frequencies Generating 200 time
points (-143.6 to 1639.6 ms) The window size used is 128 samples (512
ms) wide. Estimating 102 linear-spaced frequencies from 1.0 Hz to 99.6 Hz.
My question is: how do I calculate exactly how the time and frequency bins are being split up in the 102x200 (freq x time) coh matrix ?
ie, we don't know the exact beginning and ending time/frequency that is being collected in each entry of the coh matrix.
The freqsout and timesout matrices contain the actual time latencies and frequencies. When you use FFT, even if you specify actual frequencies 'freqs', [1 2 3 4 5 6 7.... ] (which is possible), the FFT decomposition is run based on your window size and the function then searches for frequencies closest to the one you have asked for. When you use wavelets, you get the decomposition at the frequency you have actually asked for.
To obtain round frequencies for FFT, just choose a window size multiple of the sampling rate. For instance 250, 125, etc...
Hope this helps,
Arno
Thanks,
Annette Sacks
<ATT00001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20090821/f0fc9be3/attachment.html>
More information about the eeglablist
mailing list