EEGREJ Reject/excise arbitrary periods from continuous EEG data (e.g., EEG.data).

Usage: >> [outdata newt newevents boundevents] = eegrej( indata, regions, timelength, eventlatencies);

Inputs:
indata   
input data (channels, frames). If indata is a string, the function use the disk to perform the rejection
regions   
array of regions to suppress. [beg end] x number of regions. 'beg' and 'end' are expressed in term of points in the input dataset. The size() of the array should be (2, number of regions).
timelength   
length in time (s) of the input data. Only used to compute new total data length after rejections (newt).
eventlatencies   
vector of event latencies in data points. Default []=none.

Outputs:
outdata   
output dataset
newt   
new total data length
newevents   
new event latencies. If the event was in a removed region, NaN is returned.
boundevents   
boundary events latencies

Exemple: [outdat t] = eegrej( 'EEG.data', [1 100; 200 300]', [0 10]);
this command pick up two regions in EEG.data (from point 1 to
point 100, and point 200 to point 300) and put the result in
the EEG.data variable in the global workspace (thus allowing
to perform the operation even if EEG.data takes all the memory)

Author: Arnaud Delorme, CNL / Salk Institute, 2001

See the matlab file eegrej.m (may require other functions)

Back to functions