|On this page…|
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 OutMax column in the search results table, and the OutMax column was also in the object property view table, then the OutMax column 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 Complexity property, then that change to the search results table does not affect the view.
You can edit property values in the search results table.
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|
|by Name||Searches a model or chart for all objects that have the specified string in the name of the object. See Search Strings.|
|by Property Name||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.|
|by Property Value|
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.
|by Block Type|
Searches for blocks of a specified block type. Select the target block type from the list of types contained in the currently selected model.
|by Stateflow Type|
Searches for Stateflow® objects of a specified type.
|for Variable Usage|
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.
|for Referenced Variables|
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.
|for Unused Variables|
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.
|for Library Links|
Searches for library links in the current model.
Searches for Simulink® objects of a specified class.
|for Fixed Point Capable|
Searches a model for all blocks that support fixed-point computations.
|for Model References|
Searches a model for references to other models.
|by Dialog Prompt|
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 not allow sub to match substring).
Considers case when matching strings (for example, Gain does not match gain).
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 *1 as a name search string, you get no search results unless there is an item whose name starts with the two characters *1. 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.