Main Content

removeControlVariable

Remove variant control variable from variant configuration

    Description

    Note

    This function requires Variant Manager for Simulink®.

    removeControlVariable(varconfigdata,configname,ctrlvarname) removes the variant control variable named ctrlvarname from the configuration configname present in the Simulink.VariantConfigurationData object varconfigdata.

    example

    Examples

    collapse all

    Remove a control variable named PlantLoc from the variant configuration LinInterExpWithNoise.

    modelname = "slexVariantManagement";
    openExample(modelname);
    varconfigdata = Simulink.VariantManager.getConfigurationData(modelname);
    removeControlVariable(varconfigdata,"LinInterExpWithNoise","PlantLoc");

    Input Arguments

    collapse all

    Variant configuration data that contains the configuration from which you want to remove the control variable, specified as a Simulink.VariantConfigurationData object.

    Name of the variant configuration from which the control variable is removed, specified as a character vector or string scalar. The configuration must be defined in varconfigdata.

    Example: "LinInterExpNoNoise"

    Data Types: char | string

    Name of the control variable to be removed from the variant configuration, specified as a character vector or string scalar.

    Example: "PlantLoc"

    Data Types: char | string

    Version History

    Introduced in R2013b