Desktop Tools and Development Environment |
In the Command Window, Command History, Editor/Debugger, and Shortcuts callback area, MATLAB conveys syntax information via different colors to help you easily identify elements, such as if/else
statements. This is known as syntax highlighting.
In the Command Window, only the input you type is highlighted; output from running MATLAB functions is not highlighted. In the Editor/Debugger, you can specify syntax highlighting preferences for use with files in C/C++, Java, and HTML. For details, click the Help button in the preferences dialog box for the Editor/Debugger to see Language Preferences in the online documentation.
Use preferences to specify the syntax highlighting colors. When you choose a color, the Sample area in the dialog box updates to show you how it will look.
The default colors are listed here:
for
and if
, as well as the continuation ellipsis (...
), are colored blue.
%
, designating the lines as comments in MATLAB, are colored green. Similarly, the block comment symbols, %{
and %}
, as well as the code in between, appear in green. Text following the continuation ellipsis on a line is also green because it is a comment.
')
, it becomes purple. Note that for functions you enter using command syntax instead of function syntax, the arguments are highlighted as strings. This is to alert you that in command notation, variables are passed as literal strings rather than as their values. For more information, see MATLAB Command Syntax in the MATLAB Programming documentation.
!
(shell escape) are colored gold.
Click Restore Default Colors to return to the default settings for syntax highlighting colors and desktop tool colors.
See Also
For information about other preferences and how MATLAB stores preferences, see About Preferences.
Colors Preferences for Desktop Tools | General Preferences for MATLAB |
© 1994-2005 The MathWorks, Inc.