Simply EEGLAB
What a STUDY is and when you need one
Station 8 · Lesson 1 · EEGLAB 2026.1
In the GUI
- FileLoad existing dataset
animal_study/cba/cbaanimal.set - Channels per frameFrames per epochEpochsSampling rate (Hz)Epoch start (sec)Epoch end (sec)ReferenceChannel locationsICA weights
- Epochs
Script
files = dir(fullfile(studyDir, '*', '*.set'));
fprintf('%d dataset files under %s\n', numel(files), studyDir);
animalFiles = files(contains({files.name}, 'animal'));
A = pop_loadset('filename', animalFiles(1).name, 'filepath', animalFiles(1).folder, 'loadmode', 'info');
B = pop_loadset('filename', animalFiles(end).name, 'filepath', animalFiles(end).folder, 'loadmode', 'info');
show = @(label, a, b) fprintf('%-20s %-14s %-14s\n', label, num2str(a), num2str(b));
fprintf('%-20s %-14s %-14s\n', 'Property', animalFiles(1).name, animalFiles(end).name);
show('Sampling rate (Hz)', A.srate, B.srate);
show('Channels', A.nbchan, B.nbchan);
show('Points per epoch', A.pnts, B.pnts);
show('Epoch start (s)', A.xmin, B.xmin);
show('Epoch end (s)', A.xmax, B.xmax);
show('Epochs', A.trials, B.trials);
show('ICA weights', ~isempty(A.icaweights), ~isempty(B.icaweights));
show('ICA components', size(A.icaweights, 1), size(B.icaweights, 1));
show('ICLabel results', isfield(A.etc, 'ic_classification'), isfield(B.etc, 'ic_classification'));
show('Dipoles', isfield(A.dipfit, 'model'), isfield(B.dipfit, 'model'));
fprintf('Same channel labels in the same order: %d\n', ...
isequal({A.chanlocs.labels}, {B.chanlocs.labels}));
eeg_eventtypes(A);
eeg_eventtypes(B);Which value should I choose?
| What to check | Rule |
|---|---|
| Sampling rate | Must match |
| Epoch window and number of points | Must match |
| Channel names | Must use the same naming system |
| Removed channels | Best interpolated in each participant's file before the STUDY |
| Event and condition names | Must be spelled the same |
| Processing steps (filters, reference, rejection) | Must be the same |
| ICA weights and ICLabel results | Needed to remove flagged components during precomputing |
| Dipoles | Needed to cluster components by location |
| Number of epochs | Naturally differs |
For your Methods
Before group analysis, the datasets of all [14] participants were checked for identical sampling rate, epoch limits, channel labels and event types (EEGLAB 2026.1).