Main Content

syncWithApp

Sync model parameters to real-time application parameters

Since R2021a

    Description

    syncWithApp(parameter_set,app_name) synchronizes the parameter name-value pairs and synchronizes the model checksum saved in the parameter set object with the real-time application.

    A typical usage for the syncWithApp command occurs when you create a new model from an old model by adding or removing several blocks with tunable parameters. You would like to use the parameter set saved from the old model. But, directly loading the old parameter set to the new model generates an error because the number of parameters and model checksum do not match the new model. The syncWithApp command adds or removes the unmatched parameters from the parameter set. The command also updates the checksum, which lets you reuse the parameter set saved from the old model.

    example

    Examples

    collapse all

    To update the parameter set object with the parameter values from the model, use the syncWithApp command.

    syncWithApp(myParamSet,mdlName);

    Input Arguments

    collapse all

    The ParameterSet object that was created from the real-time application in the importParamSet command.

    Example: myParamSet

    Provides name of real-time application MLDATX file on the development computer that you built from the model.

    Example: 'slrt_ex_osc'

    Version History

    Introduced in R2021a