[FieldTrip] Error using ft_prepare_neighbours

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Jun 7 20:12:53 CEST 2016


Hi Anne,

I believe that this issue has been fixed a while ago.

If I check the latest version of the code on https://github.com/fieldtrip/fieldtrip/blob/master/ft_prepare_neighbours.m it looks fine to me.
In particular, in line 94 the variable hasdata is explicitly defined.

Could you please upgrade to the most recent version of Fieldtrip and try again?



Best wishes,
Jan-Mathijs




On 07 Jun 2016, at 19:24, Anne Mickan <amickan1990 at gmail.com<mailto:amickan1990 at gmail.com>> wrote:

Dear all,

I'm doing permutation tests, for which I wrote a script a while ago, which worked nicely back then, but now gives me the following error when I run the ft_prepare_neighbours function:

Error: Undefined function or variable 'hasdata'.

I'm assuming that this means that the function does not properly access the data structure that I give it. I just don't know why and how to fix it, given that the very same script worked about half a year ago. I have updated my version to Matlab 2016a in the meantime, but all other things stayed the same.

To give you a better idea, here is what my data looks like for one participant:

Data{1}
avg: [34x600 double]
time: [1x600 double]
fsample: '500'
label: {34x1 cell}
dimord: 'chan_time'
dof: [34x600 double]
var: [34x600 double]

I have data for 21 participants.

Here is the part of the script up until the prepare neighbours function, Correct and Incorrect being the respective datasets for my two conditions:


cfg = [];

cfg.channel   = 'all';

cfg.latency   = 'all';

cfg.parameter = 'avg';



% prepare neighbouring channels

cfg_neighb = [];

cfg_neighb.method = 'triangulation';

cfg_neighb.channel = 'all';

cfg_neighb.feedback = 'yes';

cfg_neighb.layout = 'easycapCustomMSC.mat';

cfg_neighb.neighbourdist = 0.2;

neighbours = ft_prepare_neighbours(cfg_neighb, Correct{1});


I hope this is enough information to help me out.


Thanks in advance,

Anne

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto: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/20160607/d721a336/attachment-0002.html>


More information about the fieldtrip mailing list