Designed for psychological experiments, this function creates the randomised trial order
Updated 26 Jan 2017

View License

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.
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 (2024). makeDesignMat(conditions,repeats) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Stochastic Differential Equation (SDE) Models in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes