Main Content

ff2n

Two-level full factorial design

Description

dFF2 = ff2n(n) returns a 2n-by-n numeric matrix dFF2 containing the treatments of a full factorial design for n two-level factors. Each row of dFF2 corresponds to a single treatment (combination of the factor levels). Each column of dFF2 contains the treatment values for a single factor, with values of 0 and 1 for the two levels.

example

Examples

collapse all

Create a full factorial design for three two-level factors.

dFF2 = ff2n(3)
dFF2 = 8×3

     0     0     0
     0     0     1
     0     1     0
     0     1     1
     1     0     0
     1     0     1
     1     1     0
     1     1     1

Each row of dFF2 corresponds to a single treatment (combination of factor levels) in the full factorial design.

Input Arguments

collapse all

Number of two-level factors in the full factorial design, specified as a nonnegative integer.

Example: 3

Data Types: single | double

Alternative Functionality

Instead of using ff2n, you can create a fullFactorialDOE object by using the fullFactorialDOE function. The fullFactorialDOE function provides these advantages:

  • The fullFactorialDOE function 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 fullFactorialDOE function stores your specifications in the fullFactorialDOE object properties.

  • After you create a fullFactorialDOE object, you can fit a linear model to the design points using the fitlm function.

Version History

Introduced before R2006a