[FieldTrip] error Conversion to struct in ft_prepare_neighbours

Mariam Kostandyan Mariam.Kostandyan at UGent.be
Mon Jan 22 14:22:16 CET 2018


Dear Jan-Mathijs,


I guess it partially worked since it started reading the .set file but still outputed an error:


>>  cfg.method        = 'distance';
cfg.neighbourdist = 4;
cfg.channel       = {'FP1', 'FP2', 'F7', 'F3', 'FZ', 'F4', 'F8', 'FT9', 'FC5', 'FT10', 'T7', 'C3', 'CZ', 'C4', 'T8', 'TP9', 'CP5', 'CP6', 'TP10', 'P9', 'P7', 'P3', 'PZ', 'P4', 'P8', 'P10', 'O1', 'OZ', 'O2'};
cfg.feedback      = 'yes';
cfg.elecfile = 'sub03_Mariam_cues.set';
neighbours = ft_prepare_neighbours(cfg, 'sub03_Mariam_cues.set');
reading electrodes from file 'sub03_Mariam_cues.set'
Attempt to reference field of non-structure array.

Error in ft_prepare_neighbours (line 176)
    [dataidx, sensidx] = match_str(data.label, label);


Is it the .set file that has electrodes as a non-structure array?


Best,

Mariam


----------------------

Mariam Kostandyan
PhD student
University of Gent
Department of Experimental Psychology
Henri Dunantlaan 2, 9000 Gent, Belgium
----------------------

Room 140.021
Tel.: +32 9 264 6398
E-mail: Mariam.Kostandyan at UGent.be<mailto:Mariam.Kostandyan at UGent.be>
E-mail: kostandyan.m at gmail.com<mailto:kostandyan.m at gmail.com>
________________________________
От: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> от имени Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl>
Отправлено: 22 января 2018 г. 13:51
Кому: FieldTrip discussion list
Тема: Re: [FieldTrip] error Conversion to struct in ft_prepare_neighbours

Dear Mariam,

Perhaps it will work if you remove the 'elec'-field from the cfg.

Best wishes,
Jan-Mathijs

On 22 Jan 2018, at 12:11, Mariam Kostandyan <Mariam.Kostandyan at UGent.be<mailto:Mariam.Kostandyan at UGent.be>> wrote:

Dear all,

I am quite new to the FieldTrip. I want to use it to check for the inter-electrode distances using the ft_prepare_neighbours function. My script looks like this:

cfg.method        = 'distance';
cfg.neighbourdist = 4;
cfg.channel       = {'FP1', 'FP2', 'F7', 'F3', 'FZ', 'F4', 'F8', 'FT9', 'FC5', 'FT10', 'T7', 'C3', 'CZ', 'C4', 'T8', 'TP9', 'CP5', 'CP6', 'TP10', 'P9', 'P7', 'P3', 'PZ', 'P4', 'P8', 'P10', 'O1', 'OZ', 'O2'};
cfg.feedback      = 'yes';
cfg.elec  = {'FP1', 'FP2', 'F7', 'F3', 'FZ', 'F4', 'F8', 'FT9', 'FC5', 'FT10', 'T7', 'C3', 'CZ', 'C4', 'T8', 'TP9', 'CP5', 'CP6', 'TP10', 'P9', 'P7', 'P3', 'PZ', 'P4', 'P8', 'P10', 'O1', 'OZ', 'O2'};
cfg.elecfile = 'sub03_Mariam_cues.set';
neighbours = ft_prepare_neighbours(cfg, 'sub03_Mariam_cues.set');

When I run it I get error messages:

Error using struct
Conversion to struct from cell is not possible.

Error in ft_checkconfig (line 248)
  cfg.elec = ft_datatype_sens(struct(cfg.elec));

Error in ft_preamble_trackconfig (line 37)
cfg = ft_checkconfig(cfg, 'trackconfig', 'on');

Error in ft_preamble (line 85)
evalin('caller', full_cmd);

Error in ft_neighbourplot (line 65)
ft_preamble trackconfig

How can I fix it? I would appreciate any help.

Best,
Mariam

----------------------

Mariam Kostandyan
PhD student
University of Gent
Department of Experimental Psychology
Henri Dunantlaan 2, 9000 Gent, Belgium
----------------------

Room 140.021
Tel.: +32 9 264 6398
E-mail: Mariam.Kostandyan at UGent.be<mailto:Mariam.Kostandyan at UGent.be>
E-mail: kostandyan.m at gmail.com<mailto:kostandyan.m at gmail.com>
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180122/da9131b5/attachment-0002.html>


More information about the fieldtrip mailing list