| Using Simulink | ![]() |
Associating User Data with Blocks
You can use the Simulink set_param command to associate your own data with a block. For example, the following command associates the value of the variable mydata with the currently selected block.
The value of mydata can be any MATLAB data type, including arrays, structures, objects, and Simulink data objects.
Use get_param to retrieve the user data associated with a block.
The following command causes Simulink to save the user data associated with a block in the model file of the model containing the block.
| Subclassing Simulink Data Classes | Modeling with Simulink | ![]() |
© 1994-2005 The MathWorks, Inc.