[FieldTrip] ft_sourceanalysis, reshape error

David Pedrosa david.pedrosa at ndcn.ox.ac.uk
Fri Feb 5 14:47:50 CET 2016


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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160205/d14d2c05/attachment-0001.html>


More information about the fieldtrip mailing list