Reverse clipping of extra channels
raphaelchristin opened this issue · comments
Raphaël Christin commented
It seems that this snippet of code, instead of clipping off extra bad channels, adds extra empty entries and increases the size of the other involved variables when em is bigger than d.
if size(em,1)>size(d,1); nch=size(em,1); d(nch+1:end,:)=[]; LL(nch+1:end,:)=[]; nns(nch+1:end)=[]; ns(ns>size(em,1))=[];
fprintf(2, 'ALERT: Clipping off extra bad channel entries (make sure you have the right ICEEG and bad channel files loaded)\n');
end
We should clip only if em is smaller than d I think.