matlab(tdcs): assert reference group present; README scope note
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,8 @@ groupCell = groupCell(dayMask);
|
||||
% level). Only categories actually present after merge+window survive.
|
||||
S.group = categorical(groupCell);
|
||||
allCats = categories(S.group);
|
||||
assert(ismember(cfg.ref, allCats), 'tdcs_scenario_data:refMissing', ...
|
||||
'Reference group "%s" is absent from scenario "%s".', cfg.ref, char(scenario));
|
||||
otherCats = allCats(~strcmp(allCats, cfg.ref));
|
||||
S.group = reordercats(S.group, [{cfg.ref}; otherCats]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user