Main Content

getConfiguration

Get specific variant configuration from variant configuration data object

    Description

    Note

    This function requires Variant Manager for Simulink®.

    variantconfig = getConfiguration(varconfigdata,nameofconfig) returns the variant configuration named nameofconfig from the Simulink.VariantConfigurationData object varconfigdata.

    example

    Examples

    collapse all

    Get the variant configuration named LinInterExpNoNoise from the variant configuration data object varconfigdata. varconfigdata is the Simulink.VariantConfigurationData object associated with the model specified by modelname.

    modelName = "slexVariantManagement";
    openExample(modelName);
    varconfigdata = Simulink.VariantManager.getConfigurationData(modelname);
    getConfiguration(varconfigdata,"LinInterExpNoNoise");

    Input Arguments

    collapse all

    Variant configuration data from which you want to get the specified configuration, specified as a Simulink.VariantConfigurationData object.

    Name of the variant configuration to be returned, specified as a character vector or string scalar.

    Example: "LinInterExpNoNoise"

    Data Types: char | string

    Output Arguments

    collapse all

    Variant configuration, returned as a structure with these fields:

    FieldTypeDescription
    Namechar

    Name of the configuration.

    Descriptionchar

    Description of the configuration.

    ControlVariablesstruct

    The variant control variable names and their values, returned as a structure.

    Version History

    Introduced in R2013b