EvaluationMonitor

EvaluationMonitor

is an option for various numerical computation and plotting functions that gives an expression to evaluate whenever functions derived from the input are evaluated numerically.

Details

  • The option setting is normally given as EvaluationMonitor:>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[{var1=val1,},expr] is effectively used. »

Examples

open allclose all

Basic Examples  (3)

Print information with every function evaluation used to find a root:

In[1]:=
Click for copyable input
Out[1]=

Count evaluations:

In[1]:=
Click for copyable input
Out[1]=

Use Reap and Sow to collect evaluation data:

In[1]:=
Click for copyable input
Out[1]=

Show the superlinear convergence of the method:

In[2]:=
Click for copyable input
Out[2]=

Scope  (5)

Generalizations & Extensions  (2)

Applications  (6)

Properties & Relations  (1)

See Also

StepMonitor  Sow  Monitor  Print  Trace  Method

Tutorials

Introduced in 2003
(5.0)
| Updated in 2007
(6.0)