Simply EEGLAB

Extracting epochs

Station 5 · Lesson 1 · EEGLAB 2026.1

In the GUI

  1. ToolsExtract epochs
  2. Extract data epochs - pop_epoch()...Time-locking event type(s) ([]=all)
  3. Ok rtsquaresquaresquare
  4. Epoch limits [start, end] in seconds -1 2
  5. Name for the new dataset D1 epochs
  6. Out-of-bounds EEG limits if any [min max]
  7. OkName it:Overwrite it in memory (set=yes; unset=create a new dataset)Ok

Script

EEG = pop_epoch(EEG, {'square'}, [-1 2], 'newname', 'D1 epochs', 'epochinfo', 'yes');
EEG = eeg_checkset(EEG);
disp(size(EEG.data));
fprintf('Epochs: %d, from %.3f s to %.3f s\n', EEG.trials, EEG.xmin, EEG.xmax);

Which value should I choose?

GoalWindow
ERP onlyStart at least 200 ms before the event, and end after the last ERP component you care about
ERP plus time-frequency analysisLonger, such as -1 2 here
Our path on this site-1 2

For your Methods

Continuous data were segmented into epochs from -1 to 2 s relative to the onset of each square stimulus (pop_epoch, EEGLAB 2026.1), yielding [80] epochs.

Full lesson: https://simplyeeglab.pages.dev/en/lesson/extract-epochs/

Content license: CC BY-NC-SA 4.0 · MIT (code)

An independent learning site, not affiliated with EEGLAB or SCCN.