[FieldTrip] ft_sourceanalysis, reshape error
Azeez Adebimpe
azeez.adebimpe5 at gmail.com
Fri Feb 5 14:56:15 CET 2016
Hi David,
Probably the channels' labels in leadfield and data are not the same.
check it and try again.
Azeez
On Fri, Feb 5, 2016 at 8:47 AM, David Pedrosa <david.pedrosa at ndcn.ox.ac.uk>
wrote:
> Dear list,
>
> 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:
>
> cfg = [];
> cfg.frequency = 20;;
> cfg.grid = leadfield;
> cfg.method = 'dics';
> cfg.refchan = 'ExtR1';
> cfg.channel = {'EEG' 'ExtR1'};
> cfg.vol = hdm;
> cfg.dics.projectnoise = 'no';
> cfg.dics.lambda = '1%';
> cfg.dics.keepfilter = 'yes';
> cfg.dics.keeptrials = 'yes';
> cfg.dics.realfilter = 'yes';
> sourceAll = ft_sourceanalysis(cfg, freqAll);
>
> 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.
>
> Thanks in advance
> Best,
> David
>
> ------------------------------
> Dr. David Pedrosa
>
> Clinical Research Fellow
> Medical Research Council Brain Network Dynamics Unit at the University of
> Oxford
> Nuffield Department of Clinical Neurosciences
> University of Oxford
> Level 6, West Wing
> John Radcliffe Hospital, OX3 9DU
> *Tel:* +44 (0)1865 572490
> *E-Mail:* david.pedrosa at ndcn.ox.ac.uk
>
> http://www.mrcbndu.ox.ac.uk/
> <https://owa.nexus.ox.ac.uk/owa/redir.aspx?C=E40BwPuNq0uXQGSOPDW39AmtYlwBR9IIjsI0PRu9uuTE46jeZnqjmG6XP02rBAUiF1EnCJtn3UU.&URL=http%3a%2f%2fwww.mrcbndu.ox.ac.uk%2f>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160205/a2cfc6cd/attachment-0002.html>
More information about the fieldtrip
mailing list