<div dir="ltr"><div><div><div><div>Dear all,<br><br></div>I'm trying to repair the bad channels by using the ft_channelrepair function for 64 channels EEG data.<br><br>I've set up the structure like this:<br><br><br>
load('/home/leeh/Programs/fieldtrip-20140803/template/layout/easycapM11.mat');<br> <br> cfg_neighb.method = 'distance';<br> cfg_neighb.layout = lay;<br> neighbours = ft_prepare_neighbours(cfg_neighb, data4);<br>
<br> cfg = [];<br> if strcmp('S004', dir_analysis{sub}) == 1<br> cfg.badchannel = {'C4', 'TP9', 'FC4', 'C2', 'F4'};<br> end<br> cfg.trials = 'all';<br>
cfg.method = 'average';<br> cfg.neighbours = neighbours;<br> cfg.elec = lay.pos;<br> data5 = ft_channelrepair(cfg, data4);<br><br></div>However, I get an error message:<br><br>ttempt to reference field of non-structure array.<br>
Error in ft_datatype_sens (line 136)<br>nchan = length(sens.label);<br>Error in ft_checkconfig (line 246)<br> cfg.elec = ft_datatype_sens(cfg.elec);<br>Error in ft_preamble_trackconfig (line 38)<br>cfg = ft_checkconfig(cfg, 'trackconfig', 'on');<br>
Error in ft_preamble (line 54)<br> evalin('caller', ['ft_preamble_' cmd]);<br>Error in ft_channelrepair (line 76)<br>ft_preamble trackconfig <br><br></div>Can someone please help me?<br><br>Thank you very much!<br>
<br>Best regards,<br></div><div>Hweeling<br><br></div></div>