Simply EEGLAB

eegh & the command history

Station 9 · Lesson 1 · EEGLAB 2026.1

In the GUI

  1. FileLoad existing dataset eeglab_data.setsample_data
  2. ToolsFilter the dataBasic FIR filter (new, default)Lower edge of the frequency pass band (Hz)Ok 0.1D1 hp0.1
  3. Lower edge of the frequency pass band (Hz)Higher edge of the frequency pass band (Hz)Notch filter the data instead of pass bandOk 5862D1 hp0.1 notch60
  4. PlotChannel data (scroll)
  5. Notch filter the data instead of pass bandPlot frequency response 'revfilt',1'plotfreqz',1
  6. FileHistory scriptsSave session history script eeglabhist.mmy_first_history.m
  7. FileHistory scriptsSave dataset history script
  8. FileHistory scriptsRun scriptRun my_first_history.m

Script

eeglab nogui
eeglabRoot = fileparts(which('eeglab'));
EEG = pop_loadset('filename', 'eeglab_data.set', 'filepath', fullfile(eeglabRoot, 'sample_data'));
[EEG, com] = pop_eegfiltnew(EEG, 'locutoff', 0.1);
EEG = eeg_hist(EEG, com);
[EEG, com] = pop_eegfiltnew(EEG, 'locutoff', 58, 'hicutoff', 62, 'revfilt', 1);
EEG = eeg_hist(EEG, com);
EEG.setname = 'D1 hp0.1 notch60';
EEG = eeg_checkset(EEG);
pop_saveh(EEG.history, 'D1_hp0.1_notch60_history.m', pwd);

Which value should I choose?

You want toUse
Repeat everything you did today, across all datasetsSession history: eegh or Save session history script
Know how a specific .set file was madeDataset history: EEG.history
Build a script for other participantsThe dataset history, cleaned

Check

  • The script runs on its own
  • Same processing
  • The history file exists

Full lesson: https://simplyeeglab.pages.dev/en/lesson/eegh-history/

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

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