Simply EEGLAB
The EEG structure
Station 1 · Lesson 3 · EEGLAB 2026.1
In the GUI
- Workspace
EEG - EditEvent values
- latency (sec)
EEG.event - Cancel
Script
EEG.setname % 'Continuous EEG Data'
EEG.nbchan % 32 channels
EEG.srate % 128 samples per second
EEG.pnts % 30504 samples per channel
(EEG.pnts - 1) / EEG.srate % 238.3047 seconds (same as EEG.xmax)
size(EEG.data) % 32 30504
class(EEG.data) % 'single'
EEG.data(1, 1:5) % first 5 samples of channel 1 (microvolts)
{EEG.chanlocs(1:3).labels} % 'FPz' 'EOG1' 'F3'
EEG.event(1).type % 'square'
EEG.event(1).latency % 129.0087 (in samples)
(EEG.event(1).latency - 1) / EEG.srate % 1.0001 (in seconds)
isempty(EEG.icaweights) % 1 (true)Which value should I choose?
| Field | What it stores | Unit | Value in eeglab_data.set |
|---|---|---|---|
EEG.nbchan | Number of channels | channels | 32 |
EEG.srate | Sampling rate | Hz | 128 |
EEG.pnts | Number of samples per channel | samples | 30504 |
EEG.trials | Number of segments (1 = continuous data) | segments | 1 |
EEG.xmin and EEG.xmax | Time of the first and the last sample | seconds | 0 and 238.3047 (last sample) |
EEG.times | Time of each sample | milliseconds | from 0 to 238304.6875 |
EEG.data | The signal itself | microvolts | a 32 × 30504 matrix |
EEG.chanlocs | Name and position of each channel | — | 32 elements |
EEG.event | Events: type and latency | latency in samples | 154 events (80 square and 74 rt) |
EEG.icaweights | ICA weights | — | empty |
Check
size(EEG.data)gives32 30504(EEG.pnts - 1) / EEG.srategives238.3047, the same asEEG.xmaxand as Epoch end (sec) in the main window (shown rounded as238.305)EEG.event(1).typegives'square', and the converted latency gives about1.0001seconds, matching what you saw in Edit > Event valuesnumel(EEG.event)gives154, matching the Events line in the main window