Installation guide
6 Editing and Debugging M-Files
Technique or
To ol Description For More Information
Other
Debugging
Techniques
•Add
keyboard statements to the M-file —
keyboard s tateme nts stop M-file execution at
the point where they appear and allow you
to examine and change the function’s local
workspace. This mode is indicated by a special
K>>prompt. Resume function execution by
typing
return and pressing the Enter key. For
more information, see the
keyboard reference
page.
• Remove se lecte d semicolons from the
statements in your M-file—semicolons disable
the display of output in the M-file. By removing
the semicolons, you instruct MATLAB to
display these res ults on your screen as the
M-file executes.
• List dependent functions—use the
depfun
function to see the dependent functions.
Reference pages for
keyboard and depfun
function
Cells In the Editor/Debugger, isolate sections of an
M-file, called c el ls, so you ca n easily make changes
to and run a single section.
“Using Cells for Rapid
Code Iteration and
Publishing Results” on
page 6-133
Profiler Use the Profiler to he lp yo u improv e perfo rmance
and detect problems in your M-file s. Acce ss the
Profiler from the Editor/Debugger by selecting
Tools > Open Profiler.
“Profiling for Improving
Performance” on page
7-27
Directory
Reports
The M-file Directory Reports help you po lish and
package M-files befo re providi ng them to oth ers
to use. Access all of these tools from the C urrent
Directory browser. You can acces s some of these
directly from the Editor/Debugger Tools menu.
“Directory Reports
in Current Directory
Browser” on page 7-2
6-86