Categories &

Functions List

Function Reference: fullfact

statistics: A = fullfact (levels)

Full factorial design.

A = fullfact (levels) returns a numeric matrix A with the treatments of a full factorial design specified by levels, which must be a numeric vector of real positive integer values with each value specifying the number of levels of each individual factor.

Each row of A corresponds to a single treatment and each column to a single factor. For binary full factorial design, use ff2n.

@seealso {ff2n

Source Code: fullfact

Example: 1

 

 ## Full factorial design with 3 ordinal variables
 fullfact ([2, 3, 4])

ans =

   1   1   1
   2   1   1
   1   2   1
   2   2   1
   1   3   1
   2   3   1
   1   1   2
   2   1   2
   1   2   2
   2   2   2
   1   3   2
   2   3   2
   1   1   3
   2   1   3
   1   2   3
   2   2   3
   1   3   3
   2   3   3
   1   1   4
   2   1   4
   1   2   4
   2   2   4
   1   3   4
   2   3   4