1

I'm running into an error while attempting to setup a configuration structure for a single subjects EEG data using Fieldtrip. While I think the answer is plain, I am unable to figure out for the life of me.

My code loads one subjects EEG data and setups the channels, structure and electrode positions as such:

% Prepare layout
cfglay = [];
locsall = EEG_loc.chanlocs;
elec.pos = [locsall.X;locsall.Y;locsall.Z]';
elec.label = {locsall.labels};
cfglay.elec = elec;
cfglay.skipscale = 'yes';
cfglay.skipcomnt = 'yes';
layout = ft_prepare_layout(cfglay);

However, the variable lab does not seem to be captured. I know it pertains to labeling of the electrode positions

elec.pos = [locsall.X;locsall.Y;locsall.Z]';
Unrecognized function or variable 'lab'.
Error in channelposition (line 348)
n = size(lab,2);
 ^^^
Error in ft_datatype_sens (line 379)
 [chanpos, chanori, lab] = channelposition(sens);
 ^^^^^^^^^^^^^^^^^^^^^
Error in ft_datatype_sens (line 181)
 sens = ft_datatype_sens(sens, 'version', '2011v2');
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ft_datatype_sens (line 163)
 sens = ft_datatype_sens(sens, new_argin{:});
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ft_checkconfig (line 251)
 cfg.elec = ft_datatype_sens(struct(cfg.elec));
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ft_prepare_layout (line 160)
cfg = ft_checkconfig(cfg, 'renamed', {'elecfile', 'elec'});
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in MVPA_test_1 (line 107)
layout = ft_prepare_layout(cfglay);
 ^^^^^^^^^^^^^^^^^^^^^^^^^

But I'm not too sure what the correct variable definition is.

Brentspine
1,0321 gold badge13 silver badges26 bronze badges
asked yesterday

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.