<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Clara,<div><br></div><div>Did you check the tutorial on the website? </div><div><br></div><div><a href="http://fieldtrip.fcdonders.nl/tutorial/connectivity">http://fieldtrip.fcdonders.nl/tutorial/connectivity</a></div><div><br></div><div>The input data to ft_connectivityanalysis has some requirements.</div><div>For coherence, you either need a freq-structure containing a 'fourierspctrm' field, or a 'crsspctrm' (+ 'powspctrm') field. The 'fourierspctrm' by definition should have a dimord of 'rpttap_chan_freq(_time', and the 'crsspctrm' may have lost the 'rpt' or 'rpttap' dimension. If your freq data looks different, you will not be able to compute coherence. Admittedly, the error messages you get are quite unspecific, but given the scarce information you are providing with respect to what exactly you have been doing, I can only give some general advice and point you to the documentation.</div><div><br></div><div>Best,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Apr 13, 2012, at 7:52 PM, Clara A. Scholl wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear Fieldtrip users,<br><br>I'm encountering a problem with calculating coherence between two time<br>courses.  I suspect I'm misunderstanding something very basic.<br><br>When I calculate the coherence using data with multiple trials -- with<br>dimensions rpttap_chan_freq, everything works fine (I get a coherence<br>spectrum calculation that is averaged over the rpt dimension).<br>However if I want to limit the calculation to data with dimensions<br>chan_freq (i.e. find the coherence between the fourier spectra<br>(containing both amplitude and phase info) of a single timecourse on<br>two different channels (where those channels are specified using<br>cfg.channelcmb)), I get an error. I've tried to do this two different<br>ways.  If I still use the rpttap_chan_freq data, I tried specifying<br>cfg.trials=1 in the connectivity analysis input, and the error given<br>is:<br>??? Index exceeds matrix dimensions.<br><br>Error in ==> ft_connectivity_corr at 131<br>      p1    = reshape(input(j,powindx(:,1),:,:,:), siz(2:end));<br><br>Error in ==> ft_connectivityanalysis at 471<br>    [datout, varout, nrpt] = ft_connectivity_corr(data.(inparam), optarg{:});<br><br><br>->>If I input frequency data with dimensions chan_freq into<br>ft_connectivityanalysis (still only specifying cfg.method='coh' and<br>the channel combinations I'm interested in with cfg.channelcmb) the<br>output is:<br><br>??? Index exceeds matrix dimensions.<br><br>Error in ==> ft_checkdata>fixcsd at 843<br>      tmpdat1 = data.fourierspctrm(indx,cmbindx(:,1),:,:);<br><br>Error in ==> ft_checkdata at 629<br>    data = fixcsd(data, cmbrepresentation, channelcmb);<br><br>Error in ==> univariate2bivariate at 37<br>        data    = ft_checkdata(data, 'cmbrepresentation', 'sparse',<br>'channelcmb', cmb);<br><br>Error in ==> ft_connectivityanalysis at 320<br>          [data, powindx, hasrpt] = univariate2bivariate(data,<br>'fourierspctrm', 'crsspctrm', dtype, 'cmb', cfg.channelcmb, 'keeprpt',<br>normrpt);<br><br><br>->>Does the coherence calculation appear to require more than one<br>(complex) value at each channel & frequency band of interest? Am I<br>confused about what the rpttap dimension contains? My time window is<br>narrow and my fft calculation only has 1 taper, is that a problem?<br>Because the fourier calculation at each channel_frequency point<br>contains both amplitude and phase information, wouldn't data with<br>chan_freq dimensions be sufficient to calculate the cross spectral<br>densities between the fourier transforms of two channels?<br><br>Thanks for any guidance,<br>Clara<br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br></div></blockquote></div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div></div></span></div></span></div></span></div></span></div>
</div>
<br></div></body></html>