Download MATLAB POLYSPACE 7 Installation guide

Transcript
6
Editing and Debugging M-Files
To make a document in the Editor/Debugger become the current document,
click it, or select it from the Window menu or document bar.
M-File Cells
If you open an M-file that contains M-file cells, yellow highlighting and
gray horizontal lines might appear in the M-file, along with an information
toolbar. Cell mode is used for publishing results and rapid code iteration.
An M-file cell is denoted by a %% at the start of a line. MATLAB interprets
any M-file that contains %% at the start of a line as including cells and the
Editor/Debugger reflect the cell toolbar state and the cell display preferences,
such as yellow highlighting of the current cell and gray lines between cells.
The first time you open an M-file that contains cells, an information bar
appears below the cell toolbar, providing links for details about cell mode. To
dismiss the information bar, click the close box on the right side of the bar.
The information bar does not appear again, but you can get the same quick
access to the information about M-file cells from the information button
on
the cell toolbar.
To hide the cell toolbar, right-click in the toolbar and select Cell Toolbar from
the context menu. If you do not want cell mode enabled, select Cell > Disable
Cell Mode. Because MATLAB remembers the cell mode between sessions, if
cell mode is disabled when you quit MATLAB, it is disabled the next time you
start MATLAB, and the converse is true.
Other Methods for Opening Files in the Editor/Debugger
These are other ways to open files in the Editor/Debugger:
• Drag a file from another MATLAB desktop tool or a Windows tool into
the Editor/Debugger. For example, drag files from the Current Directory
browser, or from Windows Explorer.
• Open files from the Current Directory browser — see “Opening Files” on
page 5-47.
• Select a file to open from the most recently used files, which are listed at
the bottom of the File menu in the Editor/Debugger and all other desktop
tools. You can change the number of files appearing on the list — select
6-10