[Eeglablist] interpolate previously deleted channels

Gorka FG gorkafraga at gmail.com
Mon Feb 6 16:24:28 PST 2017


Dear all,

I have a dataset in which bad channels were manually removed using  EEG =
pop_select (EEG, 'channel', *chans2keep*). In later steps, I was unable to
interpolate those removed channels so I did a workaround inserting blank
channels and then interpolating (see below).
Would this approach be correct? am I missing a more simple way of doing
this using pop_interp?

Thanks in advance for the help!
Gorka

*--*
%insert blank channels using *insertrows*  (
http://nl.mathworks.com/matlabcentral/fileexchange/9984-insertrows-a-b-ind-)
 in each trial:
       for trial = 1:size(EEG.data,3); % loop thru trials
            tmp= EEG.data(:,:,trial);
              for c = 1:length(chans2interpNum); % loop thru indexes of
channels to interpolate
                  tmp=
insertrows(tmp,zeros(1,size(EEG.data,2))],chans2interpNum(c)-1); %insert a
row of zeros at chan index position
              end
            newEEG(:,:,trial) = tmp;
            clear tmp
       end
       EEG.data = newEEG;
%interpolate:
       EEG = eeg_checkset(EEG);
        EEG = pop_chanedit(EEG,'load',chanlocsfile,'besa');
           for c = 1:length(chans2interp);
               EEG =pop_interp(EEG,chans2interpNum(c), 'spherical');
           end
         EEG = eeg_checkset(EEG);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170207/fb2d9288/attachment.html>


More information about the eeglablist mailing list