test = load([chan_path chan_file]);
if isfield(test,'expected_chanlocs')
test = test.expected_chanlocs;
end
expected_chanlocs structure is composed of 2 fields: "expected_chanlocs" and "channeighbstructmat".
In the current version of the code, the variable "test" is the parent expected_chanlocs structure, but we want it to be the field itself (i.e. "expected_chanlocs.expected_chanlocs").
Solution:
test = load([chan_path chan_file]);
test = struct2cell(test);
test = test{1};
if isfield(test,'expected_chanlocs')
test = test.expected_chanlocs;
end
line 304:
expected_chanlocs structure is composed of 2 fields: "expected_chanlocs" and "channeighbstructmat". In the current version of the code, the variable "test" is the parent expected_chanlocs structure, but we want it to be the field itself (i.e. "expected_chanlocs.expected_chanlocs").
Solution: