[FieldTrip] error Conversion to struct in ft_prepare_neighbours

Mariam Kostandyan Mariam.Kostandyan at UGent.be
Mon Jan 22 12:11:52 CET 2018


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


More information about the fieldtrip mailing list