Iterations, StartingPoint

Number of iterations in plot::Iteration

Value Summary

Iterations, StartingPointOptionalMuPAD® expression

Graphics Primitives

ObjectsDefault Values
plot::Iteration

Iterations: 10

Description

Iterations and StartingPoints are special attributes for iteration objects of type plot::Iteration. StartingPoint sets the starting point, Iterations sets the number of iteration steps.

The call it := plot::Iteration(f, x_0, n, x = `x_{min}`..`x_{max}`) yields a visualization of the iteration xi = f(xi - 1) of the starting point x0 with i = 1, …, n. The values x0 and n are stored as the attributes StartingPoint = x0 and Iterations = n in the iteration object it. The values can be accessed and changed as the slots it::StartingPoint and it::Iterations, respectively.

These attributes can be animated.

Examples

Example 1

We define and plot an iteration object:

f := plot::Function2d(exp(-2*x), x = 0..1):
g := plot::Function2d(x, x = 0..1):
it := plot::Iteration(exp(-2*x), 0.2, 5, x = 0..1):
plot(f, g, it)

The starting point x0 = 0.2 and the number of iteration steps 5 are stored inside the iteration object:

it::StartingPoint, it::Iterations

We change these values:

it::StartingPoint := 0.1:
it::Iterations := 30:
plot(f, g, it)

delete f, g, it:
Was this topic helpful?