You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not able to plot cluster dipoles with the groups option when running
STUDY = std_dipplot(STUDY,ALLEEG,'clusters',5, 'design', 4, 'groups', 'on');
This runs without the groups option.
First I was getting the error:
Index in position 2 exceeds array bounds. Index must not exceed 89.
Error in std_dipplot>dipgroups (line 761)
subj_group{n,1} = ALLEEG(1,subjectnum(n)).group;
Error in std_dipplot (line 227)
[cluster_dip_models, options] = dipgroups(ALLEEG, STUDY, cls, comp_to_disp, cluster_dip_models, options);
I think this is because my subjects were not named with consecutive numbers. So I altered the code around line 760 to be:
for n = 1:length(comp_to_disp)
subjectID = comp_to_disp{n}(1:3); % Extract the subject ID (e.g., '001')
% Find the corresponding subject in STUDY.datasetinfo or ALLEEG
for i = 1:length(STUDY.datasetinfo)
if strcmp(subjectID, STUDY.datasetinfo(i).subject) % Match the subject ID
subjectnum(n,1) = i; % Store the index of the matched subject
break;
end
end
end
This meant that I had no error but no Figure window appeared (nothing happened).
Versions
EEGLAB 2024.1
MATLAB R2023b
The text was updated successfully, but these errors were encountered:
Description
I'm not able to plot cluster dipoles with the groups option when running
STUDY = std_dipplot(STUDY,ALLEEG,'clusters',5, 'design', 4, 'groups', 'on');
This runs without the groups option.
First I was getting the error:
I think this is because my subjects were not named with consecutive numbers. So I altered the code around line 760 to be:
This meant that I had no error but no Figure window appeared (nothing happened).
Versions
EEGLAB 2024.1
MATLAB R2023b
The text was updated successfully, but these errors were encountered: