<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi everyone,<br>I am trying to interpolate some noisy channels but I keep getting an error I am not able to solve. Here is my code:<br><br>%prepare neighbours<br><span style="font:400 13.33px/19.99px Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:transparent">cfg = [];</span></div><div><span style="font:400 13.33px/19.99px Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:transparent"></span>cfg.method = 'distance';<br>cfg.channel = 'all';<br>cfg.layout = 'acticap-64ch-standard2.mat';<br>cfg.feedback ='yes';<br>neighbours = ft_prepare_neighbours(cfg, data_ica_cleaned);<br><br></div><div>% interpolate noisy channels<br>cfg = [];<br>cfg.badchannel = {'F8','FT9','FT7'};<br>cfg.method = 'weighted';<br>cfg.neighbours = neighbours;<br>cfg.elecfile = 'acticap-64ch-standard2.mat';<br>interpolated_data = ft_channelrepair(cfg,data_ica_cleaned);<br clear="all"><br>And the error I get is this:<br><br>Undefined function or variable 'lab'.</div><div>Error in channelposition (line 331)<br>n = size(lab,2);</div><div>Error in ft_datatype_sens (line 350)<br> [chanpos, chanori, lab] = channelposition(sens);</div><div>Error in ft_datatype_sens (line 158)<br> sens = ft_datatype_sens(sens, 'version', '2011v2');</div><div>Error in ft_read_sens (line 475)<br>sens = ft_datatype_sens(sens);</div><div>Error in ft_fetch_sens (line 150)<br> sens = ft_read_sens(cfg.elecfile);</div><div>Error in ft_channelrepair (line 129)<br> sens = ft_fetch_sens(cfg, data);<br><br><br>I don't know if I'm getting this error because I haven't defined the structure for EEG channels (sens.label, sens.chanpos, sens.elecpos, sens.tra), but I haven't done it because I'm not really sure of how to do it.<br><br>Could anyone help me?<br>Thanks a million!!<br><br></div><div class="gmail_signature" dir="ltr"><div dir="ltr"><div><div dir="ltr"><span><b>Iris Milán Maillo</b><br>
<br>
PhD Student<br><a href="https://www.upf.edu/web/spb" target="_blank">Speech Production and Bilingualism (SPB)</a><br>
<a href="http://cbc.upf.edu/cbc.upf.edu/" target="_blank">Center for Brain and Cognition (CBC)</a><br><br>
</span></div></div></div></div></div></div></div></div>