<div dir="ltr"><div><div>Hi Jan-Mathijs, <br></div>still the same result with the code that you suggested. <br><br>selection fourierspctrm along dimension 2<br>averaging crsspctrm over rpt<br>removing dimension rpt from crsspctrm<br>
Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. <br>> In progress at 16<br> In ft_connectivity_corr at 87<br> In ft_connectivityanalysis at 524<br>Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. <br>
> In progress at 16<br> In ft_connectivity_corr at 89<br> In ft_connectivityanalysis at 524<br>Warning: PROGRESS is only a compatibility wrapper, which will soon be removed. Please instead call FT_PROGRESS. <br>> In progress at 16<br>
In ft_connectivity_corr at 106<br> In ft_connectivityanalysis at 524<br>the call to "ft_connectivityanalysis" took 0 seconds<br><br><br></div>Lucia</div><div class="gmail_extra"><br clear="all"><div><font color="#666666">-- <br>
Lucia.</font></div>
<br><br><div class="gmail_quote">On Thu, May 2, 2013 at 3:12 PM, jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Lucia,<div><br></div><div>The warnings indicate that you are dividing by zero. Are you sure that your cfg is correct?</div>
<div><br></div><div>Please try</div><div><br></div><div>cfg = [];</div><div>cfg.method = 'coh';</div><div>coh = ft_connectivityanalysis(cfg, freq);</div><div><br></div><div>This should work.</div><div><br></div><div>
Best,</div><div>Jan-Mathijs</div><div><div class="h5"><div><br><div><div>On May 2, 2013, at 6:56 PM, Lucia Melloni wrote:</div><br><blockquote type="cite"><div dir="auto"><div>Hi jan-mathijs</div><div><br></div><div>Unfortunately I get the same result whether or not I remove the mean. </div>
<div>Best,</div><div>-- Lucía</div><div><br>On May 2, 2013, at 9:57 AM, jan-mathijs schoffelen <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>> wrote:<br><br></div><blockquote type="cite">
<div>Hi Lucia,<div><br></div><div>Could you remove cfg.removemean = 'yes' and try again?</div><div><br></div><div>Best,</div><div><br></div><div>Jan-Mathijs</div><div><br><div><div>On Apr 29, 2013, at 2:38 AM, Lucia Melloni wrote:</div>
<br><blockquote type="cite"><div>Hi!<br>I am trying to calculate coherence using ft_connectivityanalysis, but<br>I am getting only ones and infinity as output in cohspctrm with all of<br>
my data sets.<br><br>I first run ft_freqanalysis with<br>cfg.method = 'mtmfft';<br>cfg.taper = 'dpss';<br>cfg.output = 'fourier';<br>cfg.foilim = [1 45];<br>cfg.tapsmofrq = 1;<br>cfg.keeptrials = 'yes';<br>
cfg.keeptapers = 'yes';<br>freq = ft_freqanalysis(cfg, data);<br><br>Whether I do or I do not specify cfg.channel and cfg.channelcmb here<br>does not seem to make a difference for my problem later on. The<br>spectra look absolutely fine.<br>
<br>I then run ft_connectivityanalysis with<br>cfg.method = 'coh';<br>cfg.removemean= 'yes';<br>cfg.trials = 'all';<br>cfg.feedback = 'yes';<br>cfg.complex = 'abs';<br>coh = ft_connectivityanalysis(cfg, freq);<br>
<br>The cohspctrm looks like this:<br>val(:,:,1,1) =<br><br> 1 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf<br>Inf Inf Inf (etc.)<br><br>I get the following warning during ft_connectivityanalysis<br>
<br>Warning: Divide by zero.<br><blockquote type="cite">In ft_connectivity_corr at 103<br></blockquote> In ft_connectivityanalysis at 524<br>Warning: Divide by zero.<br><blockquote type="cite">In ft_connectivity_corr at 104<br>
</blockquote> In ft_connectivityanalysis at 524<br><br>The same happens if I try to calculate PLV through ft_connectivityanalysis.<br>This is with Fieldtrip version 20130422 and 20130427, Matlab R2009a,<br>Windows 7 (64bit).<br>
<br>Any advice?<br>Thanks!<br>Lucia<br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</div></blockquote></div><br><div>
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<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" target="_blank">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a></div>
<div><br></div><div><a href="http://www.hettaligebrein.nl/" target="_blank">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>fieldtrip mailing list</span><br><span><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a></span><br>
<span><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></span></div></blockquote></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote>
</div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<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" target="_blank">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a></div>
<div><br></div><div><a href="http://www.hettaligebrein.nl" target="_blank">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></div></div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>