Guy on Simulink

Simulink & Model-Based Design

Model Explorer for Data Management and more

Update: Original videos have been removed form this blog post. To see similar content, please see this link: Improved Signal Management with Model Explorer

Parasar KodatiBy Parasar Kodati

Working with models can involve multiple interfaces to configure and run a simulation. You may need to: navigate through the various levels of model hierarchy in the model editor; use the Configuration Parameters interface to select things like the solver and step size; and use the MATLAB workspace for loading data and specifying data characteristics. Today I will show how you can manage a great deal of model information using a single interface.

With Model Explorer, you can view model hierarchy and the associated data at different levels of scope in the same interface. You can even mass edit data attributes and perform tasks related to requirements linking. In R2010b, Model Explorer has new features to find data dependency of a model and its components, import and export data from files as well as ability to organize and filter entity views. Let us look at some of the tasks you do regularly and see how you can do these with less effort.

1. Find the variables used by a model and save them to a file

To find the data dependency of a model or subsystem simply use the context menu and select Find Referenced variables option. Once you have the variables select them and use the “Export” option from the context menu to save them to a MAT-file or an editable MATLAB file.

2. Find the different data types of constant block outputs

Navigate to the subsystem of interest and then group the entities by OutputDatatypeStr property. In the Filter Contents checkbox type Blocktype:Constant to filter the content to constant blocks. This shows all the constant blocks in the subsystem grouped by the data type of their output. Collapse the groups to look at the different datatypes of the variables and expand them back to inspect individual items.

3. Apply the set of configuration parameters that you used for a model in an earlier project to the model in your current project.

Navigate to the old model in Model Explorer, click on the “Export Active Configuration Set” from the context menu and save it to a MAT file or an editable MATLAB file. Select the new model and click on the Import option from the context menu. In the Import dialog select the file with old configuration parameters to import them to the new to the new model.

Now it’s your turn!

How often do you use Model Explorer and what do you use it for? Leave a comment here and tell us how you manage your data.

  • print
  • send email


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.