[Eeglablist] interpolating bad channels (eeg_interp() )

Arnaud Delorme arno at salk.edu
Mon Oct 1 00:29:51 PDT 2007


Here is an example of how to use the function.
If channel 5 is bad and you want to replace it by its interpolated 
version, type in

EEG = eeg_interp(EEG, 5);

Note also that the function std_interp can interpolate bad channels for 
all datasets present in a study.

Best,

Arno

Jane Aspell wrote:
> hi again
> thanks a lot for your help with my earlier problem.
> i have some bad channels in my data, but different bad channels for 
> different subjects, so need to interpolate them. i have come across 
> the function eeg_interp() but can't find much info on how to use it 
> and can't get it to work. the script begins as pasted below. do i need 
> to first declare somewhere what 'bad_elec', 'method' and 'ORIEEG' are 
> (what does ORIEEG refer to?!) or perform any other preparatory steps?
> or does anyone knows an easier method than this?...
> any help is much appreciated!
> jane
>  
>
> %eeg_interp() - interpolate data channels
> %
> % Usage: EEGOUT = eeg_interp(EEG, badchans, method);
> %
> % Inputs:
> %     EEG      - EEGLAB dataset
> %     badchans - [integer array] indices of channels to interpolate.
> %                For instance, these channels might be bad.
> %                [chanlocs structure] channel location structure 
> containing
> %                either locations of channels to interpolate or a full
> %                channel structure (missing channels in the current
> %                dataset are interpolated).
> %     method   - [string] griddata method used for interpolation
> %                (default is 'invdist')
> %
> % Output:
> %     EEGOUT   - data set with bad electrode data replaced by
> %                interpolated data
> %
>
> % $Log: eeg_interp.m,v $
>
> function EEG = eeg_interp(ORIEEG, bad_elec, method)
>
>     EEG = ORIEEG;
>     if nargin < 2
>         help eeg_interp;
>         return;
>     end;
>    
>     if nargin < 3
>         method = 'invdist';
>     end;
>
>     if isstruct(bad_elec)
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eeglablist mailing list eeglablist at sccn.ucsd.edu
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu




More information about the eeglablist mailing list