fullfact
Full factorial design
Syntax
Description
returns a numeric matrix dFF = fullfact(levels)dFF containing the treatments of a full
factorial design specified by levels. The elements of the input vector
levels correspond to the number of levels for each individual factor.
Each row of dFF corresponds to a single treatment (combination of the
factor levels). Each column of dFF contains the treatment values for a
single factor, with integer values ranging from one to the number of levels. The size of
dFF is m-by-n, where
m is the product of the elements of levels, and
n is the length of levels.
Examples
Input Arguments
Tips
To create a full factorial design where each factor has only two levels (
0and1), useff2n.
Alternative Functionality
Instead of using fullfact, you can create a fullFactorialDOE object by using the fullFactorialDOE function. The fullFactorialDOE function provides these advantages:
The
fullFactorialDOEfunction allows you to specify the factor names, number of factors, which factors are categorical, number and values of the levels for each factor, and experiment model.In addition to returning the design points, the
fullFactorialDOEfunction stores your specifications in thefullFactorialDOEobject properties.After you create a
fullFactorialDOEobject, you can fit a linear model to the design points using thefitlmfunction.
Version History
Introduced before R2006a