Documentation Center

  • Trial Software
  • Product Updates

Contents

tunablevars2parameterobjects

Create Simulink parameter objects from tunable parameters

Syntax

tunablevars2parameterobjects ('modelName')
tunablevars2parameterobjects ('modelName', class)

Description

tunablevars2parameterobjects ('modelName') creates Simulink.Parameter objects in the base workspace for the variables listed in the specified model's Tunable Parameters dialog, then deletes the source information from the dialog. To preserve the information, save the resulting Simulink® parameter objects into a MAT-file.

If a tunable variable is already defined as a numeric variable in the base workspace, the variable will be replaced by a parameter object and the original variable will be copied to the object's Value property.

If a tunable variable is already defined as a Simulink parameter object, the object will not be modified but the information for the variable will still be deleted from the Tunable Parameters dialog.

If a tunable variable is defined as any other class of variable, the variable will not be modified and the information for the variable will not be deleted from the Tunable Parameters dialog.

tunablevars2parameterobjects ('modelName', class) creates objects of the specified class rather than Simulink.Parameter objects.

Input Arguments

modelName

Model name or handle

class

Parameter class to use for creating objects

Default: Simulink.Parameter

See Also

Was this topic helpful?