Installation guide
6 Editing and Debugging M-Files
Message Identifier dialog box. An example of an error m essage identifier
is
MATLAB:UndefinedFunction. Similarly, to obtain a warning message
identifier, produce the warning and then run
[m,id] = lastwarn; MATLAB
returns the last warning identifier to
id. An e xample of a warning message
identifier is
MATLAB:divideByZero.
Function Alternative for Error Breakpoints
The function equivalent for each option appears in the Stop if
Errors/Warnings for All Files dialog box. For example, the function
equivalent for Always stop if error is
dbstop if error.Usethedbstop
function with appropriate argumen ts to set error breakpoints from the
Command Window, and use
dbclear to clear them. Use dbstatus to view the
error b reakpoints currently set. Error breakpoints are listed in the
cond field
and message identifiers for breakpoints are liste d in the
identifier field of
the
dbstatus output.
6-132