the same name, but are in different scopes on page 20-11, highlighting one does not
cause the other to highlight.
Find references to a function or variable using automatic highlighting by following these
steps:
(^1) In a file open in the Editor, click an instance of the variable you want to find
throughout the file. MATLAB indicates all occurrences of that variable within the file
by:
- Highlighting them in teal blue (by default) throughout the file
- Adding a marker for each in the indicator bar
If a code analyzer indicator and a variable indicator appear on the same line in a
file, the marker for the variable takes precedence.
(^2) Hover over a marker in the indicator bar to see the line it represents.
(^3) Click a marker in the indicator bar to navigate to that occurrence of the variable.
(^4) Replace an instance of a function or variable by editing the occurrence at a line to
which you have navigated.
This image shows an example of how the Editor looks with variable highlighting enabled.
In the image, the variable i appears highlighted in sky blue, and the indicator bar
contains three variable markers.
Find and Replace Text in Files