| REJTREND | Detect linear trends in EEG activity and reject the epoched trials based on the accuracy of the linear fit. |
| Usage: | >> [rej rejE] = rejtrend( signal, winsize, minslope, minR, step); |
| Inputs: | |
signal |
3 dimensional signal (channels x frames x trials) |
winsize |
integer determining the number of consecutive points for the detection of linear patterns |
minslope |
minimal absolute slope of the linear trend of the activity for rejection |
minR |
minimal R^2 (coefficient of determination between 0 and 1) |
step |
step for the window. Default is 1 point (2 points will divide by two the computation time) |
| Outputs: | |
rej |
rejected trials. Array with 0 or 1 for each trial. |
rejE |
rejected rows of the rejected trials |
| Algorithm: | Looked for all possible windows of size 'winsize' of each trial if the linear fit have minimum slope and R^2 |
| Author: | Arnaud Delorme, CNL / Salk Institute, 2001 |
| See also: | eeglab() |