PRODUCTS
PURCHASE
FOR USERS
COMPANY
OUR SITES
DOCUMENTATION CENTER SEARCH
Mathematica
>
Tuning & Debugging
>
Built-in
Mathematica
Symbol
Monitoring and Selecting Algorithms
Tutorials »
|
EvaluationMonitor
Sow
Monitor
Print
Method
MaxSteps
See Also »
|
Differential Equations
Numerical Evaluation & Precision
Tuning & Debugging
More About »
StepMonitor
StepMonitor
is an option for iterative numerical computation functions that gives an expression to evaluate whenever a step is taken by the numerical method used.
MORE INFORMATION
The option setting is normally given as
StepMonitor:>
expr
.
The
:>
is used instead of
->
to avoid
expr
being immediately evaluated.
Whenever
expr
is evaluated, all variables in the numerical computation are assigned their current values.
Block
[{
var
1
=
val
1
,
...
},
expr
]
is effectively used.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Monitor steps taken for a numerical minimization with
FindMinimum
:
In[1]:=
Out[1]=
Count steps:
In[1]:=
Out[1]=
Use
Reap
and
Sow
to collect step data:
In[1]:=
Out[1]=
Show steps on a plot of the function:
In[2]:=
Out[2]=
Scope
(4)
Applications
(4)
SEE ALSO
EvaluationMonitor
Sow
Monitor
Print
Method
MaxSteps
TUTORIALS
Monitoring and Selecting Algorithms
MORE ABOUT
Differential Equations
Numerical Evaluation & Precision
Tuning & Debugging
New in 5
© 2008 Wolfram Research, Inc.