[Eeglablist] Epochs rejection by script

Antonio Maffei antonio.maffei at phd.unipd.it
Mon Jul 17 02:57:50 PDT 2017

Dear EEGLab users,

I have a problem in the scripting of a pipeline for semi-automated epoch

The step I would like to accomplish are:

1) Importing the dataset
2) Performing epoch rejection based on amplitude
3) Performing epoch rejection based on linear trends
4) Review the epochs visually
5) Confirm rejection

My attempt is the following:

for i = 1:length(filenames)

    % Import EEG data

    dataset_name = filenames_epochs{i};

    EEG = pop_loadset('filename', dataset_name, 'filepath', dirpath);

    % Reject on amplitude threshold

    EEG = pop_eegthresh(EEG, 1, [1:32], -100, 100, 0, 2.0391, 1, 0);

    % Reject trends

    EEG = pop_rejtrend(EEG, 1, [1:32], 262, 0.5, 0.3, 1, 0, 0);

    % Review visually the marked epochs and confirm rejection


    % Store the dataset



I know how to achieve this by GUI but, as you can see, I fail to understand
how to review the marked epochs visually within the script.

Thank you for the help,


Antonio Maffei, Ph.D. Student

Department of General Psychology (DPG)
University of Padova
Via Venezia 8 - 35131
Padova, Italy

email: antonio.maffei at phd.unipd.it
office: 049 8277424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170717/10eb90e6/attachment.html>

More information about the eeglablist mailing list