[Eeglablist] crossf function output -- help?

Danielle Farrar dfarrar at bu.edu
Mon Jul 11 11:15:27 PDT 2011


Hello everyone,

I'm trying to use the crossf function to get values for the coherence across
channels at different frequencies.  I'm having trouble with the
documentation of the function -- when I type help crossf into the matlab
command line, it says that the output is as follows:

Outputs:
        coh         = Matrix (nfreqs,timesout) of coherence magnitudes
        mcoh        = Vector of mean baseline coherence at each frequency
        timesout    = Vector of output latencies (window centers) (ms).
        freqsout    = Vector of frequency bin centers (Hz).
        cohboot     = Matrix (nfreqs,2) of [lower;upper] coher signif.
limits
                      if 'boottype' is 'trials',  (nfreqs,timesout, 2)
        cohangle    = (nfreqs,timesout) matrix of coherence angles (in
radians)
        cohangles   = (nfreqs,timesout,trials) matrix of single-trial
coherence
                       angles (in radians), saved and output only if
'savecoher',1

What I am trying to do is average some evoked potential data, and then
compare pair-wise, a series of the electrodes to determine their coherence,
which I will eventually write to a file.  I am new to this, so am having
trouble understanding how to interpret the output of the crossf function,
which I assume will give me what I am looking for.

So my questions is: the first output matrix that I get produces a 1.0 for
every cell in the matrix for the electrodes I've tried -- is it likely that
they are that in sync?  That should be giving me the matrix of coherence
magnitudes, correct? How is the coherence calculated?  I also print out the
mean baseline coherence, which also gives a matrix of 1s.

Here is a sample of the code I am trying to use (I am aware that the loops
will only be executed once, this is for debugging purposes):

*for **i=9:9,*

*    EEG = eeg_checkset( EEG );*

*    disp(i);*

*    disp(channels{i});*

*    erp = pop_erpimage(EEG,1, [i],[],wcst_rare,0,1,{},[],'' , 'yerplabel',
'\muV', 'erp', 'on', 'limits',[NaN NaN -25 25 NaN NaN NaN NaN] , 'cbar',
'on', 'vert',[170 300] );*

*    erp_avg = mean(erp,2);*

* *

*    for j=14:14,*

*       erp2 = pop_erpimage(EEG,1, [j],[],wcst_rare,0,1,{},[],'' ,
'yerplabel', '\muV', 'erp', 'on', 'limits',[NaN NaN -25 25 NaN NaN NaN NaN]
, 'cbar', 'on', 'vert',[170 300] );*

*       erp_avg2 = mean(erp2,2);*

*       [R, mbase, times, freqs]= crossf(erp_avg,erp_avg2,1150,[-150
999],1000,0,'type','coher');*

*       disp(*

*'Displaying coherence values');*

*       disp(R);*

*       disp(*

*'Displaying mean baseline coherence values');*

*       disp(mbase);*

*       disp(*

*'Displaying times');*

*       disp(times);*

*       disp(*

*'Displaying freqs');*

*       disp(freqs);*

*        disp('Size of times');*

*       disp(size(times));*

*       disp(*

*'Size of freqs');*

*       disp(size(freqs));*

*    end*

*end*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110711/533cdf8c/attachment.html>


More information about the eeglablist mailing list