MATLAB POLYSPACE 7 Guide d'installation Page 422

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 618
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 421
6 Editing and Debugging M-Files
Examining Value
s
While the progra
m is paused, you can view the value of any variable currently
in the workspace
. Ex am ine values when you want to see whether a line of
code has produce
d the expected result or not. If the result is as expected,
continue runni
ng or step to the next line. If the result is not as expected, then
that line, or a p
revious line, contains an error. Use the following methods to
examine values
:
“Selecting the
Workspace” on page 6-114
“Viewin g Value
sasDatatipsintheEditor/Debugger”onpage6-115
“Viewin g Valu
es in the Command Window” on page 6-115
“Viewin g Value
s in the Workspace Browser and Array Editor” on page 6-116
“Evaluat in g a S
election” on page 6-117
“Examining Val
ues in the Example” on page 6-117
Many of these m
ethods are used in “Examining Values in the Example” on
page 6-117.
Selecting the Workspace
Variables ass
igned through the Com mand Window and created using scripts
are considere
d to be in the base workspace. Variables created in a function
belong to the
ir own function workspace. To examine a variable, you must
first select
its workspace. When you run a program, the current workspace
isshowninth
e Stack field. To examine values that are part of another
workspace fo
r a currently running function or for the base workspace, first
select that
workspace from the list in the Stack field.
If you use de
bugging functions from the Command Window, use
dbstack
to display t
he call stack. Use
dbup and dbdown to change to a different
workspace
.Use
who or whos to list the variables in the current workspace.
Workspace
in the Examp le . At line 10 of
collatzplot, you stepped in,
so the curr
ent line is 9 in
collatz.TheStack shows that collatz is the
current wo
rkspace.
6-114
Vue de la page 421
1 2 ... 417 418 419 420 421 422 423 424 425 426 427 ... 617 618

Commentaires sur ces manuels

Pas de commentaire