Main Content

ModelAdvisor.setModelConfiguration

Set Model Advisor configuration associated with model

    Description

    example

    ModelAdvisor.setModelConfiguration(ModelName,ConfigFile) sets the Model Advisor configuration file ConfigFile as the configuration associated with the model ModelName.

    For Model Advisor configuration files created in R2021b or earlier, use R2022a or later to open and re-save the configuration file in the Model Advisor Configuration Editor before associating the file with a model.

    Examples

    collapse all

    Set the configuration file associated with the model vdp.

    Load the model vdp. In the MATLAB® Command Window, enter:

    load_system("vdp")

    Suppose you have a Model Advisor configuration file named config.json in your current working directory. Associate the configuration config.json with the model vdp by entering:

    ModelAdvisor.setModelConfiguration("vdp","config.json")

    Input Arguments

    collapse all

    Name of a model, specified as a character vector or string scalar.

    Example: "vdp"

    Data Types: char | string

    Name or path of a Model Advisor configuration file, specified as a character vector or string scalar.

    Example: "config.json"

    Example: "C:\temp\demoConfiguration.json"

    Data Types: char | string

    Alternative Functionality

    App

    You can also use the Model Advisor to set the Model Advisor configuration associated with a model. In the Model Advisor, load your configuration file and click Open > Associate Configuration to Model. For more information, see Load and Associate a Custom Configuration with a Model.

    Version History

    Introduced in R2022a