Main Content

taguchiTypes

Valid Taguchi design types

Since R2025a

    Description

    types = taguchiTypes returns a table of all valid Taguchi design types and their descriptions.

    example

    types = taguchiTypes(n) specifies n factors in the designs.

    example

    types = taguchiTypes(bounds) specifies the bounds for the factors in the designs.

    example

    types = taguchiTypes(levels1,levels2,...,levelsN) specifies the number and levels for the factors in the designs.

    example

    types = taguchiTypes(___,Name=Value) specifies options using one or more name-value arguments in addition to any of the input argument combinations in the previous syntaxes. For example, you can specify the factor names and the number of levels per factor.

    example

    [types,noisetypes] = taguchiTypes(___) additionally returns valid design types for the noise factors specified by the NoiseFactors name-value argument. You must specify this name-value argument if you want to return noisetypes.

    example

    [___,dinfo] = taguchiTypes(___) additionally returns information about the specified model and factors. You can pass dinfo as an input to the dinfo argument of taguchiDOE to create a taguchiDOE object.

    example

    Examples

    collapse all

    Return a list of all Taguchi design types and their descriptions.

    taguchiTypes
        Type                  SupportedFactors              
        ____    ____________________________________________
    
        L4      3 two-level factors                         
        L8      7 two-level factors                         
                4 two-level factors and 1 four-level factor 
        L9      4 three-level factors                       
        L12     11 two-level factors                        
        L16     15 two-level factors                        
                12 two-level factors, 1 four-level factor   
                9 two-level factors, 2 four-level factors   
                6 two-level factors, 3 four-level factors   
                3 two-level factors, 4 four-level factors   
                5 four-level factors                        
        L18     1 two-level factor, 7 three-level factors   
                1 six-level factor, 6 three-level factors   
        L25     6 five-level factors                        
        L27     13 three-level factors                      
        L32     31 two-level factors                        
                1 two-level factor, 9 four-level factors    
        L36     11 two-level factors, 12 three-level factors
                3 two-level factors, 13 three-level factors 
        L50     1 two-level factor, 11 five-level factors   
        L54     1 two-level factor, 25 three-level factors  
        L64     21 four-level factors                       
                31 two-level factors                        
        L81     40 three-level factors                      
    

    List the valid Taguchi design types for a design that has 4 factors.

    taguchiTypes(4)
    ans = 1×3 string
        "L8"    "L12"    "L16"
    
    

    List the valid Taguchi design types for a design that has 3 two-level factors with level bounds [0,1], [1,3], and [5,6], respectively.

    taguchiTypes([0 1 5; 1 3 6])
    ans = 1×2 string
        "L4"    "L8"
    
    

    List the valid Taguchi design types for a design that has 3 two-level factors with levels ["A","B"], [1,2], and [2,3], respectively.

    taguchiTypes(["A" "B"],[1 2],[2 3])
    ans = 1×2 string
        "L4"    "L8"
    
    

    List the valid Taguchi design types for a design that has 4 three-level factors "A","B", "C", and "D".

    taguchiTypes(4,NumLevelsPerFactor=3,FactorNames=["A","B","C","D"])
    ans = 1×6 string
        "L9"    "L18"    "L27"    "L36"    "L54"    "L81"
    
    

    List the valid Taguchi design types for a design that has 2 two-level noise factors and 2 two-level non-noise factors.

    [nonnoisetypes,noisetypes] = taguchiTypes(4,NoiseFactors=[true,true,false,false])
    nonnoisetypes = 
    "L4"
    
    noisetypes = 
    "L4"
    

    List the valid Taguchi design types for a design that has 4 two-level factors. Additionally return a structure that contains information about the model and factors.

    [types,dinfo] = taguchiTypes(4)
    types = 1×3 string
        "L8"    "L12"    "L16"
    
    
    dinfo = struct with fields:
                    Levels: {[-1 1]  [-1 1]  [-1 1]  [-1 1]}
        CategoricalFactors: []
               FactorNames: ["Factor1"    "Factor2"    "Factor3"    "Factor4"]
        ModelSpecification: "linear"
        NumLevelsPerFactor: [2 2 2 2]
              NoiseFactors: []
              ModelSpecSet: 0
    
    

    Generate a Taguchi L12 design using the structure dinfo.

    dtag = taguchiDOE(dinfo,"L12")
    dtag = 
      taguchiDOE with properties:
    
                    Design: [12×4 table]
        ModelSpecification: "1 + Factor1 + Factor2 + Factor3 + Factor4"
                    Levels: {[-1 1]  [-1 1]  [-1 1]  [-1 1]}
        CategoricalFactors: []
              NoiseFactors: []
                DesignType: "L12"
    
    

    Input Arguments

    collapse all

    Number of factors in the design, specified as a positive integer.

    Example: 3

    Data Types: single | double

    Factor level bounds, specified as a 2-by-n matrix, where n is the number of factors in the design. Each column of bounds corresponds to a factor. The first row of bounds contains the lowest levels for the factors, and the second row contains the highest levels. If you specify NumLevelsPerFactor, each factor has NumLevelsPerFactor levels equally spaced between bounds. Otherwise, each factor has two levels.

    Example: [0 0.1 10; 5 0.7 50]

    Data Types: single | double

    Factor levels, specified as a numeric, logical, categorical, or string vector, or a cell array of character vectors. The software determines the number of factors from levels1,levels2,...,levelsN.

    Example: ["cohorta","cohortb"],[0,0.25,0.5,0.75],["drug1","drug2","drug3"]

    Data Types: single | double | logical | char | string | cell | categorical

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: [types,dinfo]=taguchiTypes(3,FactorNames=["A","B","C"]) returns a string vector types that contains the valid Taguchi design types for 3 factors, and a structure dinfo that contains information about the model and the factors "A", "B", and "C".

    Categorical factors list, specified as one of the values in this table.

    ValueDescription
    Vector of positive integers

    Each entry in the vector is an index value indicating that the corresponding factor is categorical. The index values are between 1 and n, where n is the number of factors in the design.

    Logical vector

    A true entry means that the corresponding factor is categorical. The length of the vector is n.

    String vector or cell array of character vectorsEach element in the array is the name of a factor. The names must match the entries in FactorNames.
    "all"All factors are categorical.

    By default, taguchiTypes treats all nonnumeric factors as categorical.

    Example: CategoricalFactors="all"

    Data Types: single | double | logical | char | string | cell

    Factor names, specified as a string vector or a cell array of character vectors. The number of unique values in FactorNames must equal the number of factors in the design. The default value for FactorNames is ["Factor1","Factor2",..."FactorN"].

    If you pass levels for a factor using variable names in the input argument levels1,levels2,...,levelsN and do not specify FactorNames, taguchiTypes assigns the workspace variable name to the corresponding factor.

    Example: FactorNames=["compound","quantity"]

    Data Types: char | string | cell

    Experiment model, specified as one of the following values.

    • A character vector or string scalar with the model name.

      ValueModel Description
      "linear"The model contains an intercept and linear term for each factor.
      "constant"The model contains only a constant (intercept) term.
      "interactions"The model contains an intercept, a linear term for each factor, and all products of pairs of distinct factors (no squared terms).
      "purequadratic"The model contains an intercept term, and linear and squared terms for each factor.
      "quadratic"The model contains an intercept term, linear and squared terms for each factor, and all products of pairs of distinct factors.
      "scheffe-linear"

      The model contains a linear term for each factor and does not include an intercept term.

      "scheffe-quad"

      The model is given by the formula:

      i=1nbixi+i=1nj<in1bijxixj

      "scheffe-special-cubic"

      The model is given by the formula:

      i=1nbixi+i=1nj<in1bijxixj+i=1nj<in1k<jn2bijkxixjxk

      "polyijk"The model is a polynomial with all terms up to degree i in the first factor, degree j in the second factor, and so on. Specify the maximum degree for each factor by using numerals 0 though 9. The model contains interaction terms, but the degree of each interaction term does not exceed the maximum value of the specified degrees. For example, "poly13" has an intercept and x1, x2, x22, x23, x1*x2, and x1*x22 terms, where x1 and x2 are the first and second factors, respectively.

      In the above table, each xi corresponds to the ith factor in the design, and bi, bij, bijk, and dij are coefficients for the model terms.

    • A character vector or string scalar formula in Wilkinson Notation. The factor names in the formula must be factor names specified by the FactorNames name-value argument.

    • A t-by-n terms matrix, where t is the number of terms and n is the number of factors in the design. A terms matrix is convenient when the number of factors is large and you want to generate the terms programmatically. For more information about terms matrices, see Terms Matrix.

    ModelSpecification does not include a response variable.

    Example: ModelSpecification="Factor1 + Factor2 + Factor3"

    Data Types: single | double | char | string

    Noise factors list, specified as one of the values in this table.

    ValueDescription
    Vector of positive integers

    Each entry in the vector is an index value indicating that the corresponding factor is a noise factor. The index values are between 1 and n, where n is the number of factors in the design.

    Logical vector

    A true entry means that the corresponding factor is a noise factor. The length of the vector is n.

    String vector or cell array of character vectorsEach element in the array is the name of a factor. The names must match the entries in FactorNames.

    You must specify this name-value argument if you want to return noisetypes

    Example: NoiseFactors=[1 2]

    Data Types: single | double | logical | char | string | cell

    Number of levels for each factor, specified as a positive integer or a vector of positive integers that has the same length as the number of factors. If NumLevelsPerFactor is a positive integer, the software assigns NumLevelsPerFactor levels to each factor.

    Example: NumLevelsPerFactor=[2,2,4]

    Data Types: single | double

    Output Arguments

    collapse all

    Valid Taguchi design types, returned as a string vector. types contains a list of valid Taguchi design types for the specified set of factors and their levels.

    Valid Taguchi design types for noise factors, returned as a string vector. noisetypes contains a list of valid Taguchi design types for the specified set of noise factors and their levels. To return noisetypes, you must specify NoiseFactors.

    Factor information, returned as a structure array. You can pass dinfo as an input argument of taguchiDOE to create a taguchiDOE object.

    More About

    collapse all

    References

    [1] Krishnaian, K., and P. Shahabudeen. Applied Design of Experiments and Taguchi Methods. New Delhi: PHI Learning Private Limited, 2012.

    Version History

    Introduced in R2025a