Installation guide

Debugging Process a nd Features
and the Array Editor opens, showing that n =2asexpected.
Evaluating a Selection
Select a variable or equation in an M -file in the Editor/Debugger. Right-click
and select Evaluate Selection from the context menu (for a single-button
mouse, use Ctrl+click). MATLAB displays the value of the variable or
equation in the Comm and Window. You cannot evaluate a selection while
MATLAB is busy, for example, running an M-file.
Examining Values in the Example
Step from line 9 through line 13 in collatz. Step again, and the pause
indicator jumps to line 17, just after the
if loop, as expected. Step ag ain, to
line 18, check the value of
sequence in line 17 and see that the array is
21
as expected for n = 2. S tep again, which moves the pause indicator from line
18 to line 11. At line 11, step again. Because
next_value is now 1, the while
loop ends. The pause indicator is at line 11 and appears as a green down
arrow
. This indicates that processing in the called function is complete and
program control will return to the calling program . Step again from line 11 in
collatz and execution is now paused at line 10 in collatzplot.
Note that instead of stepping through
collatz, the called function, a s was
just done in this example, you can step out from a called function back to the
6-117