主要内容

GetTermLabel

List labels for model terms

    Description

    Labels = GetTermLabel(Model) returns a list of those of term labels for the mbcmodel.linearmodel object.

    example

    Labels = GetTermLabel(Model,Terms) returns a list of labels with the specified terms.

    Labels = GetTermLabel(Model,Terms,'Name1','Value1') returns a list of labels with the specified terms with the specified name-value pair.

    Examples

    collapse all

    Get a term label.

    model = mbcmodel.CreateModel('Polynomial', 2);
    model.Properties.GetTermLabel([1 2; 1 0] )
      2×1 cell array
    
        {'X1*X2^2'}
        {'X1'     }
    model.Properties.GetTermLabel([1 2; 1 0],'Format','Formula')
    'X1*X2^2 + X1'

    Input Arguments

    collapse all

    Linear model, specified as a mbcmodel.linearmodel object.

    Terms in mbcmodel.linearmodel object, returned as an m-by-n array. m is the number of terms. n is the number of factors. The (m,n)th element is the power of the nth factor in the mth term.

    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.

    Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

    Example: 'Type','V-optimal'

    The design generator properties determines the applicable name-value pairs.

    Output format. The specified terms form a row where each value gives the power of that parameter.

    Example: 'Format','List'

    Output Arguments

    collapse all

    List labels for model terms, returned as an array.

    Version History

    Introduced in R2007a