Use the Model Explorer search bar to search for specific objects from the node you select in the Model Hierarchy pane.
The Model Explorer displays search results in the Search Results tab of the Contents pane.
The search results appear in a table that is similar to the object property table in the Contents tab. The search results table uses the current column view (the object property table) definition as a starting point, and adds relevant properties that are not already included in the current view. Any additional property columns added to the Search Results pane do not affect the view definition.
If you modify the property columns in the search results table
that also appear in the property table view, the changes you make
affect both tables. For example, if you hide
in the search results table, and the
was also in the object property view table, then the
is hidden in both tables. However, if in the search results table
you reorder where the
Complexity column appears,
if the view does not include the
then that change to the search results table does not affect the view.
You can edit property values in the search results table.
The search bar appears at the top of the Model Explorer window.
By default, the search bar is visible. To show or hide the search bar, select or clear the View > Toolbars > Search Bar option.
The search bar includes the following 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, the option causes the Model Explorer to evaluate the value of each property as a MATLAB® expression and compare 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 (see Refine a Search).
By default, the Model Explorer searches for objects in the system that you select in the Model Hierarchy pane. It does not search in child systems. You can override that default, so that the Model Explorer searches for objects in the whole hierarchy of the currently selected system. To toggle between searching only in the current system and searching in the whole system hierarchy of the current system, use one of these techniques:
Select View > Show Current System and Below.
Click the Show Current System and Below button at the top of the Contents pane.
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.
To start the search, click the Search button. The Model Explorer displays the results of the search in the Search Results pane.
To view a summary of the search options that you used (such as search criteria), click the Show Search Details button .
You can edit the results displayed in the Search Results pane. For example, to change all objects found by a search to have the same property value, select the objects in the Search Results pane and change the property value of one of the objects.
To refine the previous search, in the search bar, click the Select Search Options button ( ) and select Refine Search. A Refine button replaces the Search button on the search bar. Use the search bar to define new search criteria and then click the Refine button. The Model Explorer searches for objects that match both the previous search criteria and the new criteria.