makeDesignMat(condi​tions,repeats)

Designed for psychological experiments, this function creates the randomised trial order
19 Downloads
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.
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 (2024). makeDesignMat(conditions,repeats) (https://www.mathworks.com/matlabcentral/fileexchange/61303-makedesignmat-conditions-repeats), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
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
1.0.0.0