% faces2.m
 
 infile = 'faces_3.set'; % define input .set file
 datpath = 'C: ...\workshop\data\'; % input directory

 % start eeglab
 [ALLEEG EEG CURRENTSET ALLCOM] = eeglab;

 % load data set
 EEG = pop_loadset(infile, datpath);
 [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG);

 % plot IC maps
 pop_topoplot(EEG,0, [1:size(EEG.data,1)],infile,...
   [6 6] ,0,'electrodes',  'off', 'masksurf', 'on');

% Enter eye blink indices manually
 EEG.blink = input('Enter eye blink component indices: ');

% save info in current data set
 EEG = pop_saveset(EEG, infile, datpath);
 [ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);

% update EEGLAB gui
 eeglab redraw;
