Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

add_param - Add parameter to Simulink system

Syntax

add_param('sys','parameter1',value1,'parameter2',value2,...)

Description

The add_param command adds the specified parameters to the specified system and initializes the parameters to the specified values. Case is ignored for parameter names. Value strings are case sensitive. The value of the parameter must be a string. Once the parameter is added to a system, set_param and get_param can be used on the new parameters as if they were standard Simulink parameters. Simulink software saves these new parameters with the model file.

Examples

This command

add_param('vdp','DemoName','VanDerPolEquation','EquationOrder','2')

adds the parameters DemoName and EquationOrder with string values 'VanDerPolEquation' and '2' to the vdp system. Afterward, you can use the following command to retrieve the value of the DemoName parameter.

get_param('vdp','DemoName')

See Also

delete_param, get_param, set_param

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS