Colors in the Editor help you to read code, identify code elements, and evaluate sections of code. To find out why certain portions of your code appear in color, how to change the color, or learn more about the features highlighted in color, see the table that follows.
|Sample (Using Default Colors)||What the Color Indicates|
Different types of language elements, such as keywords, comments, and strings appear in different colors. This is called syntax highlighting.
See also, Syntax Highlighting
Teal blue characters indicate variables with shared scope
Sky blue shading indicates function or variable names that match the name in which the cursor is currently placed.
See also, Check Variable Scope in Editor.
Orange and red wavy underlines indicate warning and error conditions, respectively.
Orange shading indicates coding issues that MATLAB® can correct for you.
See also, Check Code for Errors and Warnings
Yellow highlighting indicates code sections, which:
See also, Divide Your File into Code Sections
Red dots represent breakpoints, which you use in debugging.
If you attempt to run your code, MATLAB stops at the first breakpoint it encounters.
See also, Debug a MATLAB Program
A gray vertical line indicates the location of a particular column in the Editor that you can use to limit line widths.
The Editor does not enforce the limit.
See also, Right-Side Text Limit Indicator