<div dir="ltr">Hello, I am currently using the fieldtrip matlab toolbox for preprocessing an EEG dataset. I want to interpolate the CZ channel with its neighbours, all three methods of 

ft_prepare_neighbours  function have been used.<div>1- I used the distance method in  ft_prepare_neighbours function but the output is:<br><div>Warning: no neighbours found for CZ <br> In ft_prepare_neighbours at line 384<br><br>Warning: No neighbouring channels were specified or found <br> In ft_prepare_neighbours at line 390           (I changed the value of cfg.neighbourdist multiple times but no changes has occurred)<br></div></div><div><br></div><div>2- The output of the triangulation method is:</div><div>Error using delaunay<br>At least three input points must be provided to define a triangular mesh.            (how can i provide these inputs?)<br><br>Error in ft_prepare_neighbours (line 275)<br>    tri = delaunay(prj(:,1), prj(:,2));<br></div><div><br></div><div>3- for the template method I made a custom neighbourhood templated with the file that you have shared on github, it works fine and I even tested it through ft_neighbourplot and the answer was still correct, the output of ft_neighbourplot was:</div><div>Selected channel CZ, which has 8 neighbours: FC1, FCZ, FC2, C1, C2, CP1, CPZ, CP2<br></div><div>But when I tried ft_channelrepair function the output was:</div><div>Error using cell/unique>celluniqueR2012a (line 249)<br>Elements of cell array input A must be character vectors (row vectors of class char).<br><br>Error in cell/unique (line 142)<br>        [varargout{1:nlhs}] = celluniqueR2012a(varargin{1},logical(flaginds(1:5)));<br><br>Error in cell/setdiff>cellsetdiffR2012a (line 303)<br>    uA = unique(a,order);<br><br>Error in cell/setdiff (line 129)<br>        [varargout{1:nlhs}] = cellsetdiffR2012a(varargin{1:2},logical(flaginds(1:3)));<br><br>Error in ft_channelrepair (line 204)<br>cfg.missingchannel = setdiff(cfg.missingchannel, data.label, 'stable');<br> <br>the summary of the code is:</div><div>cfg.channel = {'CZ'};<br>cfg.method = 'template';<br>cfg.layout = 'layout.mat';<br>cfg.template = 'neighbours.mat';<br></div><div>neighbours = ft_prepare_neighbours(cfg, data);<br></div><div>cfg.badchannel     = 'CZ';    </div>cfg.method         = 'average';<br>cfg.neighbours     = neighbours;<br><div>data_fixed = ft_channelrepair(cfg,data);</div><div><br></div><div>Would you mind please helping me with this problem?                                                       <br></div></div>