MATLAB POLYSPACE 7 Guida di Installazione Pagina 419

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 418
Debugging Process a nd Features
Some useful related functions are
dbtype Lists the M-file with line numbers in the C ommand Window.
dbstatus —Listsbreakpoints.
Running an M-File with Breakpoints
After setting breakpoints, run the M-file from the Command Window or the
Editor/Debugger.
Running the Example
For the example, run collatzplot for the simple input va lue, 3, by typing in
the Command Window
collatzplot(3)
The example, collatzplot, requires an input argument and therefore runs
only from the Command Window and not from the Editor/Debugger.
Results of Running an M-File Containing Breakpoints
Running the M-file results in the following:
The prompt in the Command Window changes to
K>>
indicating that MATLAB is in debug mode.
The program pauses at the first breakpoint. Thi s means that line will be
executed when you continue. The pause is indicated in the Editor/Debugger
by the green arrow just to the right of the breakpoint, which in the example,
is line 10 of
collatzplot as shown here.
If you use debugging functions from the Command Window, the line at
which you are paused is displayed in the Co mmand Window. For the
example, it would show
10 plot_seq = collatz(N);
6-111
Vedere la pagina 418
1 2 ... 414 415 416 417 418 419 420 421 422 423 424 ... 617 618

Commenti su questo manuale

Nessun commento