[Eeglablist] Error running PCA

Gunn, Matthew P mathewgunn1 at siu.edu
Wed Sep 4 08:38:18 PDT 2019

Good morning,

When running the following commands in a script:

   EEG = pop_runica(EEG, 'icatype', 'binica', 'pca',30,'extended',1);
   EEG = pop_subcomp( EEG, [1], 0);
   EEG = pop_select( EEG,'nochannel',{'OZ'});
   EEG = eeg_checkset( EEG );
   EEG = pop_runica(EEG, 'icatype', 'binica', 'pca',29,'extended',1);

I get the error

Error using  *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To perform elementwise multiplication, use '.*'.

Error in pop_runica (line 522)
meanvar = sum(EEG.icawinv.^2).*sum(transpose((EEG.icaweights *

Error in Remove_C1_n_PCA29_v1a (line 19)
EEG = pop_runica(EEG, 'icatype', 'binica', 'pca',29,'extended',1);

I am confused as to why I get this error as the script has worked on other PCs and works when running the command individually in the command window.

I am currently using mathlab 2019a and EEGlab 2019

Thank you for your time,

Matt Gunn

More information about the eeglablist mailing list