[Eeglablist] interpolate previously deleted channels
Makoto Miyakoshi
mmiyakoshi at ucsd.edu
Thu Feb 9 19:08:05 PST 2017
Dear Gorka,
Without testing your code on Matlab, it seems ok.
See also this page for your info.
https://sccn.ucsd.edu/wiki/Makoto's_preprocessing_pipeline#Remove_bad_channels
Makoto
On Mon, Feb 6, 2017 at 4:24 PM, Gorka FG <gorkafraga at gmail.com> wrote:
> 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);
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.
> ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
--
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170209/ab92ce5d/attachment.html>
More information about the eeglablist
mailing list