Simply EEGLAB

ALLEEG & dataset management

Station 1 · Lesson 4 · EEGLAB 2026.1

In the GUI

  1. EditSelect data eeglab_data.set
  2. Channel(s) EOG1 EOG2
  3. on->remove these
  4. OK
  5. What do you want to do with the new dataset?Name it: Continuous EEG DataD1 no EOG
  6. Save it as file:
  7. Overwrite it in memory (set=yes; unset=create a new dataset)
  8. OK
  9. Datasets Dataset 1:Continuous EEG DataDataset 2:D1 no EOG
  10. EditDelete dataset(s) from memory
  11. Dataset(s) to delete: 2
  12. OKDatasets

Script

[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
sampleFolder = fullfile(fileparts(which('eeglab')), 'sample_data');
EEG = pop_loadset('filename', 'eeglab_data.set', 'filepath', sampleFolder);
[ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG, 0);
EEG = pop_select(EEG, 'rmchannel', {'EOG1', 'EOG2'});
[ALLEEG, EEG, CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, ...
    'setname', 'D1 no EOG', 'gui', 'off');
CURRENTSET                            % 2
[ALLEEG(1).nbchan ALLEEG(2).nbchan]   % 32 30
[ALLEEG, EEG, CURRENTSET] = pop_newset(ALLEEG, EEG, CURRENTSET, 'retrieve', 1);
EEG.nbchan                            % 32
ALLEEG = pop_delset(ALLEEG, 2);
eeglab redraw;

Which value should I choose?

OptionWhen to use it
Create a new dataset (the default)You want to compare with the previous version, or you are not sure about the step yet.
Overwrite it in memoryMemory is limited, or you no longer need the previous version in this session.
Save it as file:You want to keep this version after closing MATLAB. Give it a new name so you do not overwrite the original file.

Check

  • After step 1, the first line of the main window is #2: D1 no EOG, with 30 channels
  • The Datasets menu lists two datasets, with a check mark on the current one
  • After switching to dataset 1, the main window shows #1 and 32 channels
  • After deleting, the Datasets menu lists dataset 1 only

Full lesson: https://simplyeeglab.pages.dev/en/lesson/alleeg-datasets/

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

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