Iterate a function
This functionality does not run in MATLAB.
f @@ n_fnest(
f@@n represents the
x -> f(f(...(f(x))...)) of the function
f@@n is equivalent to the call
also equivalent to
_fconcat(f $ n).
f@@0 returns the identity map
Iteration is only reasonable for functions that accept their
own return values as input. Note that
fp::fixargs is a handy tool for converting
functions with parameters to univariate functions which may be suitable
for iteration. Cf. Example 3.
For a nonnegative integer
equivalent to an
@@ simplifies the composition of symbolic
The iterate may be called like any other MuPAD® function.
f evaluates to a procedure and
an integer, a corresponding value is computed:
f := x -> x^2: (f@@n)(x) $ n = 0..10
For functions with a known inverse function,
be negative. The function
f must have been declared
as a function environment with the
Examples of such functions include the trigonometric functions which
are implemented as function environments in MuPAD:
sin::"inverse", sin@@-3, (sin@@(-3))(x)
@@ can only be used for functions that accept
their own output domain as an input, i.e.,
for some set M.
If you want to use
@@ with a function which needs
a handy tool to generate a corresponding univariate function. In the
following call, the function
f: x -> g(x, p) is
g := (x, y) -> x^2 + y: f := fp::fixargs(g, 1, p): (f@@4)(x)
delete g, f: