Use the Model Explorer to view, modify, and add elements of Simulink® models, Stateflow® charts, and workspace variables. The Model Explorer lets you focus on specific elements (for example, blocks, signals, and properties) without navigating through the model or chart.
To open the Model Explorer, use one of these approaches:
From the Simulink Editor View menu, select Model Explorer or select the Model Explorer icon from the toolbar.
In an open model in the Simulink Editor, right-click a block and from the context menu, select Explore.
In an open Stateflow chart, right-click in the drawing area and from the context menu, select Explore.
At the MATLAB® command line, enter
Use the Model Explorer to perform a wide range of activities relating to viewing and changing model and chart elements. You can perform activities in any order, using panes in the order you choose. Your actions in one pane often affect other panes.
For example, if you want to edit properties of objects in a model, you might use a general workflow such as:
Open a model.
Open the Model Explorer.
Select the model in the Model Hierarchy pane, specifying whether the Model Explorer displays only the current system or the whole system hierarchy of the current system
Control the model information the Contents pane displays, and how it displays that information, by using a combination of:
The View > Column View option to control which property columns to display
The View > Row Filter option to control which types of objects to display
Techniques to directly manipulate column headings
Identify model elements with specific values, using the search bar.
Edit the values for model elements, in either the Contents pane or the Dialog pane. To edit workspace variables, you can use the Variable Editor.
By default, the Model Explorer opens with three panes (Model Hierarchy, Contents, and Dialog), a main toolbar, and a search bar.
|Main toolbar||Execute Model Explorer commands||The Main Toolbar|
|Search bar||Perform a search within the context of the selected node in Model Hierarchy pane.||Search Bar Controls|
|Model Hierarchy pane||Navigate and explore model, chart, and workspace nodes||Model Explorer: Model Hierarchy Pane|
|Contents pane||Display and modify model or chart objects||Model Explorer: Contents Pane|
|Dialog pane||View and change the details of object properties||Model Explorer: Property Dialog Pane|
The main toolbar at the top of the Model Explorer provides buttons you click to perform Model Explorer operations. Most of the toolbar buttons perform actions that you can also perform using Model Explorer menu items.
The toolbar buttons in the following table perform actions that you cannot perform using Model Explorer menus:
Bring the MATLAB window to the front.
Display the Simulink Library Browser.
If you have Simulink Verification and Validation™ installed, you can use additional toolbar buttons relating to requirements links.
You can use the Model Explorer to add many kinds of objects to a model, chart, or workspace. The types of objects that you can add depend on the node you select in the Model Hierarchy pane. Use toolbar buttons or the Add menu to add objects. The Add menu lists the types of objects you can add.
You can customize the Model Explorer interface in several ways. This section describes how to show or hide the toolbars and how to control the font size.
Other ways you can customize the Model Explorer interface include:
To show or hide toolbars, in the Model Explorer select View > Toolbars, and then select the toolbar you want to hide from the menu.
You can change the font size in the Model Explorer panes:
To increase the font size, press the Ctrl + Plus Sign (+).
Alternatively, from the Model Explorer View menu, select Increase Font Size.
To decrease the font size, press the Ctrl + Minus Sign (-).
Alternatively, from the Model Explorer View menu, select Decrease Font Size.
Note The changes remain in effect for the Model Explorer and in the Simulink dialog boxes across Simulink sessions.
The search bar includes these controls:
Use the Search Type control to specify the type of objects or properties to include in the search.
|Search Type Option||Description|
|Searches a model or chart for all objects that have the specified string in the name of the object. See Search Strings.|
|Searches for objects that have a specified property. Specify the target property name from a list of properties that objects in the search domain can have.|
Searches for objects with a property value that matches the value you specify. Specify the name of the property, the value to be matched, and the type of match (for example, equals, less than, or greater than). See Search Strings.
Searches for blocks of a specified block type. Select the target block type from the list of types contained in the currently selected model.
Searches for Stateflow objects of a specified type.
Searches for blocks that use variables defined in a workspace. Select the base workspace or a model workspace (model name) and, optionally, the name of a variable. See Search Strings.
Searches for variables that a model or block uses. Specify the name of the model or block in the by System field. The model or block must be in the Model Hierarchy pane.
Searches for variables that are defined in a workspace but not used by any model or block. Select the name of the workspace from the drop-down list for the in Workspace field.
Searches for library links in the current model.
Searches for Simulink objects of a specified class.
Searches a model for all blocks that support fixed-point computations.
Searches a model for references to other models.
Searches a model for all objects whose dialogs contain the prompt you specify. See Search Strings.
Searches a model for all objects in which the string you specify occurs. See Search Strings.
Use the Search Options control to specify the scope and how to apply search strings.
|Match Whole String|
Do not allow partial string matches (for example, do
Considers case when matching strings (for example,
Considers a string to be matched as a regular expression.
|Evaluate Property Values During Search|
Applies only for searches by property value. If enabled, Model Explorer evaluates the value of each property as a MATLAB expression and compares the result to the search value. If this option is disabled (the default), the Model Explorer compares the unevaluated property value to the search value.
Initiates a secondary search that provides additional search criteria to refine the initial search results. The second search operation searches for objects that meet both the original and the new search criteria.
By default, search strings are case-insensitive and are treated as regular expressions.
By default, the search allows partial string matches. You cannot
use wildcard characters in search strings. For example, if you enter
a name search string, you get no search results unless there is an
item whose name starts with the two characters
If there is an
out1 item, the search results do
not include that item.
As you explore a model or chart, you might want to narrow the contents that you see in the Model Explorer to particular elements of a model or chart. You can use several different techniques. The table summarizes techniques for controlling the content the Model Explorer displays and how the contents appear.
|Technique||When to Use||Documentation|
Show partial or whole model hierarchy contents
To control how much of a hierarchical model to display
Use the Row Filter option
To focus on, or hide, a specific kind of a model object, such as signals
To find objects that might not be currently displayed
To focus on specific objects in the Contents pane, based on a search string
Once you have the general set of data that you are interested in, you can use the following techniques to organize the display of contents.
|Technique||When to Use||Documentation|
To quickly organize data for a property in ascending or descending order
Group by property column
To logically group data based on values for a property
Use column views
To display a named subset of property columns to apply to different kinds of nodes in the Model Hierarchy pane
Add, delete, or rearrange property table columns
To customize property columns