Incorrect dimensions for matrix multiplication for some EEG data files when trying to reject components from the dataset using pop_subcom().
Steps to Reproduce
EEGout = pop_runica(EEGout, 'extended',1,'interupt','off');
% Automatically rejects components based off of the ICA
EEGout=iclabel(EEGout);
d = EEGout.etc.ic_classification.ICLabel.classifications(:,1)>0.1;
rej = zeros(size(EEGout.icawinv,2),1); rej(d)=1; rej = find(rej==0);
% pop_selectcomps(EEG,1:128); pause; close all
EEGout = pop_subcomp(EEGout, rej, 0);
Expected behavior:
EEG output data without the rejected components.
Actual behavior:
The following error message:
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
operate on each element of the matrix
individually, use TIMES (.) for
elementwise multiplication.
Error in pop_subcomp (line 175)
compproj = EEG.icawinv(:, component_keep)*eeg_getdatact(EEG, 'component', component_keep, 'reshape', '2d');
Error in final_last_script (line 110)
EEGout = pop_subcomp(EEGout, rej, 0);
Description
Incorrect dimensions for matrix multiplication for some EEG data files when trying to reject components from the dataset using pop_subcom().
Steps to Reproduce
Expected behavior:
EEG output data without the rejected components.
Actual behavior:
The following error message: 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 operate on each element of the matrix individually, use TIMES (.) for elementwise multiplication. Error in pop_subcomp (line 175) compproj = EEG.icawinv(:, component_keep)*eeg_getdatact(EEG, 'component', component_keep, 'reshape', '2d'); Error in final_last_script (line 110) EEGout = pop_subcomp(EEGout, rej, 0);
Versions