Station 2 · Lesson 2

Channel locations

Starts from: S001R03.set (D2) · Already applied: Importing raw files: EDF, BDF & BrainVisionDownload the data (opens in a new tab)
Script to reach this state
MATLAB
[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
% Folder where you keep the course data (change it)
dataFolder = 'C:\Users\me\Documents\eeg-course';
EEG = pop_loadset('filename', 'S001R03.set', 'filepath', dataFolder);
[ALLEEG, EEG, CURRENTSET] = pop_newset(ALLEEG, EEG, 0, 'setname', 'S001R03', 'gui', 'off');
eeglab redraw;

The idea in brief

Right now your datasetOne EEG data file loaded in EEGLAB together with its information. knows the channelThe signal recorded from one electrode, as shown in EEGLAB. names only. It does not know where each electrodeThe physical sensor placed on the scalp to pick up the signal. sits on the head. Any scalp mapA top-down picture showing how a value is spread over the head., any step that uses neighboring channels (such as interpolating a bad channelA channel that is flat or noisy for most of the recording.), and ICAA method that separates the recording into independent sources, some brain and some artifact. component maps all need these positions.

Before and after

Before / After

Image coming soon.

Before: the EEGLAB main window with S001R03 loaded, and the Channel locations line showing No (labels only). Same window size and frame as the “after” image exactly, so the slider lines up. Real screenshot from EEGLAB 2026.1 (source: eeglab-ui).

Image coming soon.

After: the same EEGLAB main window after the lookup, with the Channel locations line showing Yes. The other lines (64 channels, 160 Hz) have not changed. Same window size and frame as the “before” image exactly. Real screenshot from EEGLAB 2026.1 (source: eeglab-ui).

What does this show?
Channel locations by name, top view with the nose at the top: 64 electrodes, Cz in the center, and Iz, T9 and T10 on or outside the head circle.
64 of 64 locations shown; edge electrodes outside the circle are expectedScreenshot of the EEGLAB interface (SCCN)

Your next questions, each answered in its own section:

Why do I need this step?

The reasons in detail, and the terms you need

EEGLAB finds the positions by matching each channel name with a template file of standard names, such as FC5 or Cz. The match works only if the names are written the standard way.

In S001R03.edf the names end with extra dots: Fc5., Cz.., T10.. The dots pad every name to four characters. A name such as Cz.. does not match Cz in the template, so EEGLAB finds no position for it. This is a real problem you will meet with files from other systems, so we fix it here first.

How do I do it in EEGLAB?

9 steps in the menus

1. See the problem

  1. Open the dataset S001R03.set you saved in the previous lesson.
  2. In the main window, the Channel locations line shows No (labels only).
  3. In the Command Window, type {EEG.chanlocs(1:3).labels}. The result is 'Fc5.' 'Fc3.' 'Fc1.': each name ends with a dot.

2. Remove the dots from the names

You can change one name by hand in Edit then Channel locations, in the Channel label (“label”) field. But there are 64 names, so it is faster to remove the dots from all of them with four lines in the Command Window:

MATLAB
for iChan = 1:EEG.nbchan
    EEG.chanlocs(iChan).labels = strrep(EEG.chanlocs(iChan).labels, '.', '');
end
[ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET); eeglab redraw;

Type {EEG.chanlocs(1:3).labels} again. The result is now 'Fc5' 'Fc3' 'Fc1'.

3. Look up the positions

  1. Open Edit then Channel locations.
  2. Because the channels have no positions yet, EEGLAB first opens a window titled Look up channel locations?.
  3. Keep the default choice in the list: use MNI coordinate file for BEM dipfit model. The file under it is standard_1005.elc.
  4. Leave Import file instead and erase all channels unticked.
  5. Click OK. The Command Window prints 64 channel with the same label found and imported.
  6. The channel editing window opens, showing each channel with its coordinates. Click OK at the bottom to close it. The changes take effect only after you close this window.

4. Check the positions on the head

Open Plot then Channel locations then By name. A head seen from above appears, nose at the top, with each electrode’s name in its place.

5. Save

Open File then Resave current dataset(s). This writes the fixed names and the positions into the same file S001R03.set in your lessons folder.

How do I write it as code?

The same steps in 20 lines of MATLAB
MATLAB
% Start EEGLAB and load the file from the previous lesson
[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
dataFolder = 'C:\Users\me\Documents\eeg-course';   % change it
EEG = pop_loadset('filename', 'S001R03.set', 'filepath', dataFolder);
[ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG, 0);

% Remove the trailing dots from the names (Fc5. -> Fc5, Cz.. -> Cz)
for iChan = 1:EEG.nbchan
    EEG.chanlocs(iChan).labels = strrep(EEG.chanlocs(iChan).labels, '.', '');
end

% Look up the positions in the standard MNI template
% (case does not matter: Fc5 matches FC5)
EEG = pop_chanedit(EEG, 'lookup', 'standard_1005.elc');
EEG = eeg_checkset(EEG);

% Plot the electrodes by name (same as Plot > Channel locations > By name)
figure; topoplot([], EEG.chanlocs, 'style', 'blank', ...
    'electrodes', 'labelpoint', 'chaninfo', EEG.chaninfo);

% Save over the lesson file and show the result in the main window
EEG = pop_saveset(EEG, 'savemode', 'resave');
[ALLEEG, EEG, CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET);
eeglab redraw
  • strrep(text, '.', '') replaces every dot in the text with nothing.
  • 'lookup', 'standard_1005.elc' is the same choice as the default in the lookup window. EEGLAB finds this file inside the dipfit pluginA package that adds new functions or menus to EEGLAB., which ships with EEGLAB.

Which value should I choose?

Suitable values for your analysis goal

The main choice is where the positions come from:

SourceWhen to use itHow
Standard MNI template (standard_1005.elc)Your cap uses standard 10-20 or 10-10 names, and you did not measure the positions. This is our case.The default choice in Look up channel locations?
Your cap’s own location file (from the manufacturer)Your system’s channel names are not standard, such as numbers E1, E2Read locations in the channel editing window
Positions measured on the participantThe person whose data were recorded in the study.’s headYou digitized the electrodes at the recording sessionRead locations with the digitizer’s file

Upper or lower case does not matter. EEGLAB compares names in lower case, so Fc5 finds FC5 in the template. Extra characters such as dots or spaces do matter.

How do I check it worked?

4 quick checks
  1. The Channel locations line in the main window shows Yes.
  2. The Command Window printed 64 channel with the same label found and imported.
  3. Plot then Channel locations then By name shows 64 electrodes: Cz in the center, Fpz at the front, Oz at the back.
  4. all(~cellfun(@isempty, {EEG.chanlocs.X})) gives 1: every channel has coordinates.

Keep S001R03.set. The next lesson (events) continues on it.

What mistakes do people make?

5 mistakes and how to avoid them
  • Looking up before removing the dots. No name matches, and no warning appears. The Channel locations line stays No (labels only). Remove the dots, then look up again.
  • Not closing the channel editing window with OK. The changes take effect only after you close it.
  • Thinking the electrodes outside the circle are a mistake. The circle marks the horizontal plane through the center of the head. Electrodes below that plane, around the lower edge of the cap (such as T7, T8, T9, T10 and Iz), are drawn on or outside it. This is expected.
  • Ticking Import file instead and erase all channels. This replaces your channels with all the template’s channels (hundreds of names). Leave it unticked.
  • Assuming the file order follows the head. In S001R03.edf the first channel is Fc5, not Fp1. Always look a channel up by its name, not by its number.

How do I write it in my paper?

A Methods template: edit the data, settings and versions to match what you ran

A template: edit the data, settings and versions to match what you ran.

Channel labels were cleaned of trailing periods and matched to the standard 10-5 template in MNI space (standard_1005.elc) with pop_chanedit (EEGLAB 2026.1).

Where can I read more?

3 sources, official docs first

Written for EEGLAB 2026.1 · 2026-10-28

Need help?

Ask, share feedback, or report an error