Collecting Expressions During Evaluation
The new functions Sow and Reap can be used to accumulate lists of
intermediate results in an evaluation. This allows users to monitor
and keep track of intermediate values of computations.
 |
 |
Example: Displaying Intermediate Results
|
 |
|
Example: StepMonitor
Sow and Reap are used to generate a list of the steps taken
during the solution of an initial value problem.
Visualizing every other step shows how NDSolve automatically adjusts the step
size throughout the computation to maintain appropriate accuracy.
(Note that the plot shows every second step of the
solution.)
|