Installation guide
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, y ellow highlighting a nd
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 deno ted 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.
ThefirsttimeyouopenanM-filethatcontainscells,aninformationbar
appears below the cell too lbar, p roviding links for details about cell mode. To
dismis s the inform ation bar, click the close box on the right side of the bar.
The informatio n 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 toolba r, right-click in the toolba r and sele ct Cell Toolbar from
the context menu. If you do not want cell mode enabled, select Cell > Disable
Cell Mode. Because MATLAB reme mbers the cell mode betwee n sessions, if
cell mode is disabled when you quit MATLAB, it is disabled the nex t time you
start MATLAB, and the converse is true.
Other Methods for Opening Files in the Editor/Debugger
TheseareotherwaystoopenfilesintheEditor/Debugger:
• D rag 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.
• O p en files from the Current Directory browser — see “Opening Files” on
page 5-47.
• Select a file to open from the most recently us ed files, w hich a re 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