Installation guide
Debugging Process a nd Features
The MAT LAB Ed itor conditional breakpoint dialog box opens as shown
in this example.
2 Type a condition in the dialo g box , where a condition is any leg al M ATLAB
expression that returns a logical scalar value. C lick OK.Asnotedinthe
dialog box, the condition is evaluated b efore running the line. For the
example, at line 10 in
collatzplot,enter
N>=2
as the condition. A yellow breakpoint icon (indicating the breakpoint is
conditional) appears in the breakpoint alley at that line.
When you run the file, MATLAB enters debug mode and pauses at the line
only when the condition is met. In the
collatzplot example, MATLAB runs
through the
for loop once and pauses on the second iteration at line 10 when
N is 2. If you continue executing, MATLAB pauses again at line 10 on the
third iteration when
N is 3.
6-127