<font size="3">Dear Fieltrip experts,<br /><br />I have my continuous data imported to fieldtrip with matlab, I'm looking for performing connectivity analysis between pairs of sensors, I have succed as:<br />data.trials {1xNepochs}; % <font size="3">N</font>epochs = 7, each epoch with 59 channels and 2000 samples<br />data.label {59x1};<br />data.time {1xNepochs};<br /><br />then, calculate only the FFT of all sensors as:<br />cfg=[];<br />cfg.output='fourier';<br />cfg.method='mtmfft';<br />cfg.taper='hanning';<br />cfg.foilim=[8.5 9.5];<br />cfg.tapsmofrq=0;<br />cfg.trials='all';<br />cfg.keeptrials='yes';<br />cfg.channel='all';<br />fourier=ft_freqanalysis(cfg, data)<br />as output I get:<br />dimord = 'rpttap_chan_freq'<br />freq= [1x9]<br />fourierspctrm=[7x59x9 double]<br /><br />Then compute the ima<font size="3">ginary part of coherency as:<br /><font size="3">cfg=[];<br /><font size="3">cfg.method ='cohe'</font>;<br /><font size="3">cfg.complex='imag';<br /><font size="3">cfg.channelc<font size="3">bm={'all'</font></font> 'all'};<br /></font></font></font>coher = ft_connect<font size="3">iv<font size="3">ityanalysis </font></font>(cfg, fourier)<br /><font size="3">as output get: <br /><font size="3">dimord='chan_chan_freq';<br /><font size="3"><font size="3">cohspctrm=[59x59x9 double]</font></font>;<br /><font size="3">dof=7;</font><br /></font></font><br /><font size="4">I have two main questions:</font><br /><br /><font size="4">A) As you see, this makes an average over the epochs of each channel, and not over the samples (which in this case are the 9 frequencies of the FFT), And I would like to have the op</font><font size="3"><font size="4">posite, </font><font size="3"><font size="4">t<font size="4">his is, to</font> get the </font><font size="3"><font size="4">imaginary part of coherence for each epoch (repeti<font size="4">t</font>ion) on all my channels and not for each frequency, som<font size="4">ething like: chan_chan_rpt or chancbm_rpt</font>, </font><font size="3"><font size="4">Is this possible?</font><br /><br /><br /><br /><font size="4">B) Another question I have is: for the Imaginary part of Coherence is not necessary to compute the cross-spectrum with 'powandcsd', only the FFT, but for the PLV, PPC or WPLI is that way too?</font><br /><br /><br /><br /><br />Many thanks in advanced,<br /><font size="3">Gabriel.</font><br /><br /></font></font></font></font></font>