In toolbox/DAiSS/bf_output_image_mv.m, the custom branch of S.isdesign builds the design matrix X but never initialises contrast. The size check at line ~332
if size(contrast,1) ~= size(X,2),
error('contrast needs to match number of columns in design');
end
Then errors with Unrecognised function or variable 'contrast'. The sibling design-from-file branch already defaults contrast = eye(size(X,2)) when the loaded design has no contrast field (line ~308). The custom branch is missing the equivalent initialiser.
Proposed fix
Mirror the design-file branch default: after the custom branch builds X and before the size-check, add
contrast = eye(size(X,2));
The minimal patch (against current main) goes at the end of the if isfield(S.isdesign,'custom') block, just before the else %% conditions and contrast specified in a file branch (around line 283 in the current source).
In
toolbox/DAiSS/bf_output_image_mv.m, thecustombranch ofS.isdesignbuilds the design matrixXbut never initialisescontrast. The size check at line ~332Then errors with Unrecognised function or variable 'contrast'. The sibling design-from-file branch already defaults contrast = eye(size(X,2)) when the loaded design has no contrast field (line ~308). The custom branch is missing the equivalent initialiser.
Proposed fix
Mirror the design-file branch default: after the custom branch builds X and before the size-check, add
contrast = eye(size(X,2));The minimal patch (against current main) goes at the end of the if isfield(S.isdesign,'custom') block, just before the else %% conditions and contrast specified in a file branch (around line 283 in the current source).