makeDesignMat(conditions,repeats)
This function creates a matrix containing all the possible condition combinations (e.g. leftward motion + low contrast), with the desired number of repeats, and randomises the presentation order. All independent variables must be specified numerically.
Example:
motionDirection = [-1, 1];
contrast = [0, 0.5, 1]
conditions = {motionDirection, contrast};
repeats = 10;
desMat = makeDesignMat(conditions,repeats);
==> desMat is a 40 by 2 matrix. The rows correspond to trial number, and the 1st column is the motion direction and 2nd column the contrast.
Cite As
Shannon Locke (2026). makeDesignMat(conditions,repeats) (https://www.mathworks.com/matlabcentral/fileexchange/61303-makedesignmat-conditions-repeats), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
