EPOCH Epoching continuous eeg data array.

Usage: >> [epochdat, indexes] = epoch( data, events, srate, timelim, valuelim, verbose);

Inputs:
data   
input data (chan,frames)
events   
events (expressed in second)
srate   
sampling rate in Hz
timelim   
[init end] in second for trial extraction centered on the events (i.e. [-1 2])
valuelim   
upper and lower limit of values that a trial should not overpass. If one positive value is given, consider the opposite for lower bound. Given values are also consider outlier (if equal the trial is rejected). Default: none.
verbose   
verbose mode (1), non-verbose (0). Default is 1.

Outputs:
epochdat   
output (chan, frames, epochs)
indexes   
indexes of accepted events

Hint: If you have events and timelim in terms of points, just put srate
to 1.

See also: pop_epoch (graphic interface function for this function in EEGLAB)

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

Back to functions