[FieldTrip] repairing bad channels
Hwee Ling Lee
hweeling.lee at gmail.com
Tue Aug 5 13:53:42 CEST 2014
Dear all,
I'm trying to repair the bad channels by using the ft_channelrepair
function for 64 channels EEG data.
I've set up the structure like this:
load('/home/leeh/Programs/fieldtrip-20140803/template/layout/easycapM11.mat');
cfg_neighb.method = 'distance';
cfg_neighb.layout = lay;
neighbours = ft_prepare_neighbours(cfg_neighb, data4);
cfg = [];
if strcmp('S004', dir_analysis{sub}) == 1
cfg.badchannel = {'C4', 'TP9', 'FC4', 'C2', 'F4'};
end
cfg.trials = 'all';
cfg.method = 'average';
cfg.neighbours = neighbours;
cfg.elec = lay.pos;
data5 = ft_channelrepair(cfg, data4);
However, I get an error message:
ttempt to reference field of non-structure array.
Error in ft_datatype_sens (line 136)
nchan = length(sens.label);
Error in ft_checkconfig (line 246)
cfg.elec = ft_datatype_sens(cfg.elec);
Error in ft_preamble_trackconfig (line 38)
cfg = ft_checkconfig(cfg, 'trackconfig', 'on');
Error in ft_preamble (line 54)
evalin('caller', ['ft_preamble_' cmd]);
Error in ft_channelrepair (line 76)
ft_preamble trackconfig
Can someone please help me?
Thank you very much!
Best regards,
Hweeling
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140805/d1995908/attachment-0001.html>
More information about the fieldtrip
mailing list