[Eeglablist] Problems with edit channel labels

Wade Zheng yzhe163 at aucklanduni.ac.nz
Tue Oct 27 14:40:56 PDT 2020


Hi EEGlab community,

I've come across a problem with channel locations and below are my codes:
---------------------------------------------------------------------------------------------------------
%Step 1 add Cz back
EEG = eeg_checkset( EEG );
EEG = pop_reref( EEG,
[],'refloc',struct('labels',{'Cz'},'Y',{0},'X',{5.2239e-16},'Z',{8.5313},'sph_theta',{0},'sph_phi',{90},'sph_radius',{8.5313},'theta',{0},'radius',{0},'type',{'REF'},'ref',{''},'urchan',{[]},'datachan',{0}));
[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);


%Step 2 import channel locations
EEG = pop_chanedit(EEG, 'load',{'H:\\echome\\Files\\Experiments\\Pilot
Study\\EEG Data\\EGI 129 128 Hydrocel SFP files\\129 channel Hydrocel EGI
SPF file .sfp' 'filetype'
'autodetect'},'delete',1,'delete',1,'delete',1,'eval','chans =
pop_chancenter( chans, [],[]);');
[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);

%Step 3 Edit channel location names from EGI to 10-20 channel labels
EEG=pop_chanedit(EEG, 'changefield',{11 'labels' 'Fz'},'changefield',{9
'labels' 'Fp2'},'changefield',{22 'labels' 'Fp1'},'changefield',{24 'labels'
'F3'},'changefield',{33 'labels' 'F7'},'changefield',{36 'labels'
'C3'},'changefield',{45 'labels' 'T7'},'changefield',{52 'labels'
'P3'},'changefield',{58 'labels' 'P7'},'changefield',{62 'labels'
'Pz'},'changefield',{70 'labels' 'O1'},'changefield',{83 'labels'
'O2'},'changefield',{92 'labels' 'P4'},'changefield',{96 'labels'
'P8'},'changefield',{104 'labels' 'C4'},'changefield',{108 'labels'
'T8'},'changefield',{122 'labels' 'F8'},'changefield',{124 'labels' 'F4'});
[ALLEEG EEG] = eeg_store(ALLEEG, EEG, CURRENTSET);
--------------------------------------------------------------------------------------------------------------
I'm using an EGI 128 channel system and when I load the raw file and run
step 1 & 2 it goes well, but when I run step 3 an error pops up saying that
"using vertcat Dimensions of arrays being concatenated are not
consistent".  Can anyone provide suggestions? Many thanks!



More information about the eeglablist mailing list