This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Iterations, StartingPoint

Number of iterations in plot::Iteration

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Value Summary

Iterations, StartingPointOptionalMuPAD® expression

Graphics Primitives

ObjectsDefault Values

Iterations: 10


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.


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?