<div dir="ltr">Hi David,<div><br></div><div>Sorry for late reply, I was on the journey. </div><div>The same issue happened to me before when the labels in the leadfield and data were not the same. </div><div>if you have 'Fp1' in leadfield and 'FP1' in data, it will view as different channels.</div><div><br></div><div><br></div><div>Azeez</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 5, 2016 at 9:51 AM, David Pedrosa <span dir="ltr"><<a href="mailto:david.pedrosa@ndcn.ox.ac.uk" target="_blank">david.pedrosa@ndcn.ox.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi Azeez,
<br>
<br>
thank you for the fast reply! <br>
I hadn't considered that but I have checked and I use the same labels for both leadfield and data.<br>
<div><br>
I mean it makes kind of sense that the reshape doesn't work as it is now, but I don't know where the problem is before.<br>
<br>
Can you think of anything else?<span class=""><br>
<br>
Best,<br>
David<br>
<br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-size:13px">
<hr>
<font size="2" face="Tahoma"><font color="003366">Dr. David Pedrosa<br>
</font></font><font color="003366" size="2" face="Tahoma"><br>
Clinical Research Fellow</font><font color="003366" size="2" face="Tahoma"><br>
</font><font color="003366" size="2" face="Tahoma"><span dir="ltr" style="font-size:10pt">
<div>
<div><span style="font-size:13px">
<div><font size="2"><span style="font-size:10pt">Medical Research Council Brain Network Dynamics Unit at the University of Oxford<br>
Nuffield Department of Clinical Neurosciences</span></font></div>
<div>University of Oxford</div>
<div>Level 6, West Wing</div>
<div>John Radcliffe Hospital, OX3 9DU<br>
</div>
</span></div>
</div>
</span></font><font color="003366" size="2" face="Tahoma"><span style="font-size:10pt"><u>Tel:</u>
</span></font><font size="2" face="Tahoma"><span style="font-size:10pt"><font color="003366"><a href="tel:%2B44%20%280%291865%20572490" value="+441865572490" target="_blank">+44 (0)1865 572490</a><br>
<u>E-Mail:</u> </font><font color="333333"><a href="mailto:david.pedrosa@ndcn.ox.ac.uk" target="_blank">david.pedrosa@ndcn.ox.ac.uk</a><br>
</font></span></font><font size="2"><span style="font-size:10pt"><br>
<a href="https://owa.nexus.ox.ac.uk/owa/redir.aspx?C=E40BwPuNq0uXQGSOPDW39AmtYlwBR9IIjsI0PRu9uuTE46jeZnqjmG6XP02rBAUiF1EnCJtn3UU.&URL=http%3a%2f%2fwww.mrcbndu.ox.ac.uk%2f" target="_blank">http://www.mrcbndu.ox.ac.uk/</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</span></div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" size="2" face="Tahoma"><b>Von:</b> <a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a>]" im Auftrag von "Azeez Adebimpe [<a href="mailto:azeez.adebimpe5@gmail.com" target="_blank">azeez.adebimpe5@gmail.com</a>]<br>
<b>Gesendet:</b> Freitag, 5. Februar 2016 13:56<br>
<b>An:</b> FieldTrip discussion list<br>
<b>Betreff:</b> Re: [FieldTrip] ft_sourceanalysis, reshape error<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">Hi David,
<div><br>
</div>
<div>Probably the channels' labels in leadfield and data are not the same.</div>
<div><br>
</div>
<div>check it and try again.</div>
<div><br>
</div>
<div>Azeez</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa <span dir="ltr">
<<a href="mailto:david.pedrosa@ndcn.ox.ac.uk" target="_blank">david.pedrosa@ndcn.ox.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Dear list,
<br>
<br>
after installing the newest version of Fieldtrip today, I have encountered a rather strange error . I am tying to compute corticomuscular coherence for an EEG/EMG dataset and it worked well so far. With the new version however, I get a reshape error I find
 fard to understand. This is the code:<br>
<br>
    cfg              = [];<br>
    cfg.frequency    = 20;;<br>
    cfg.grid        = leadfield;<br>
    cfg.method       = 'dics';<br>
    cfg.refchan      = 'ExtR1';<br>
    cfg.channel         = {'EEG' 'ExtR1'};<br>
    cfg.vol          = hdm;<br>
    cfg.dics.projectnoise = 'no';<br>
    cfg.dics.lambda       = '1%';<br>
    cfg.dics.keepfilter   = 'yes';<br>
    cfg.dics.keeptrials   = 'yes';<br>
    cfg.dics.realfilter   = 'yes';<br>
    sourceAll = ft_sourceanalysis(cfg, freqAll);    <br>
<br>
but this hasn't changed. The error pops up at lines 619/620 of ft_sourceanalysis (Cf = reshape(sum(Cf, 1) / Ntrials, [Nchans Nchans]);), where it supposedly just averages the CSD matrix over trials.  And it makes kind of sense as the line says to reshape the
 CSDs from a 1xNchans matrix into a [Nchans Nchans] one. But why is it poppin up now as nothing has changed in my analyses? I have checked the updates of the last months and I couldn't find anything related to this. So has any one an idea why the analysis crashes
 at this point. <br>
<br>
Thanks in advance<br>
Best,<br>
David<br>
<br>
<div>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-size:13px">
<hr>
<font size="2" face="Tahoma"><font color="003366">Dr. David Pedrosa<br>
</font></font><font color="003366" size="2" face="Tahoma"><br>
Clinical Research Fellow</font><font color="003366" size="2" face="Tahoma"><br>
</font><font color="003366" size="2" face="Tahoma"><span dir="ltr" style="font-size:10pt">
<div>
<div><span style="font-size:13px">
<div><font size="2"><span style="font-size:10pt">Medical Research Council Brain Network Dynamics Unit at the University of Oxford<br>
Nuffield Department of Clinical Neurosciences</span></font></div>
<div>University of Oxford</div>
<div>Level 6, West Wing</div>
<div>John Radcliffe Hospital, OX3 9DU<br>
</div>
</span></div>
</div>
</span></font><font color="003366" size="2" face="Tahoma"><span style="font-size:10pt"><u>Tel:</u>
</span></font><font size="2" face="Tahoma"><span style="font-size:10pt"><font color="003366"><a href="tel:%2B44%20%280%291865%20572490" value="+441865572490" target="_blank">+44 (0)1865 572490</a><br>
<u>E-Mail:</u> </font><font color="333333"><a href="mailto:david.pedrosa@ndcn.ox.ac.uk" target="_blank">david.pedrosa@ndcn.ox.ac.uk</a><br>
</font></span></font><font size="2"><span style="font-size:10pt"><br>
<a href="https://owa.nexus.ox.ac.uk/owa/redir.aspx?C=E40BwPuNq0uXQGSOPDW39AmtYlwBR9IIjsI0PRu9uuTE46jeZnqjmG6XP02rBAUiF1EnCJtn3UU.&URL=http%3a%2f%2fwww.mrcbndu.ox.ac.uk%2f" target="_blank">http://www.mrcbndu.ox.ac.uk/</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<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" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div></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" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>