EEGTHRESH Classical trial rejection rejection using a threshold on the raw signal

Usage: >> [Iin, Iout, newsignal, elec] = eegthresh( signal, frames, elecs, negthresh, posthresh, timerange, starttime, entime)

Inputs:
signal   
signal 2D, channels x (frames*sweeps) or 3D channels x frames x sweeps
frames   
number of points per epoch
elecs   
[e1 e2 ...] electrodes (number) to take into consideration for rejection
negthresh   
negative threshold limit in mV (can be an array if several electrodes; if less numbe of values than number of electrodes the last value is used for the remaining electrodes)
posthresh   
positive threshold limit in mV (same syntax as negthresh)
timerange   
[mintime maxtime] timerange limit in second
starttime   
starting time limit in second (same syntax as negthresh)
endtime   
ending time limit in second (same syntax as negthresh)

Outputs:
Iin   
Indexes of sweeps not rejected
Iout   
Indexes of sweeps rejected
newsignal   
signal after sweeps rejection (same number of dimension as signal)
elec   
electrode that served for the rejection (array of 0 and 1, same number of column as Iout, rows=number of electrodes)

Author: Arnaud Delorme, CNL / Salk Institute, 2001

See also: pop_eegthresh, eeglab()

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

Back to functions