Difference between revisions of "Iteration Command"
From GeoGebra Manual
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact ) |
m (examples format) |
||
Line 2: | Line 2: | ||
{{command|function}} | {{command|function}} | ||
;Iteration[ <Function>, <Number x0>, <Number n> ]:Iterates the function ''n'' times using the given start value ''x0''. | ;Iteration[ <Function>, <Number x0>, <Number n> ]:Iterates the function ''n'' times using the given start value ''x0''. | ||
− | :{{Examples|1=< | + | :{{Examples|1=<div> |
+ | :*After defining <code>f(x) = x^2</code> the command <code>Iteration[f, 3, 2]</code> gives you the result ''(3<sup>2</sup>)<sup>2</sup>=81'' | ||
+ | :*To obtain the repeated addition of 7 to the number 3: if g(x) = x+7 then <code>Iteration[g, 3, 4]</code> yields (((3+7) +7) +7) +7 = 31.</div>}} |
Revision as of 11:13, 14 June 2013
- Iteration[ <Function>, <Number x0>, <Number n> ]
- Iterates the function n times using the given start value x0.
- Examples:
- After defining
f(x) = x^2
the commandIteration[f, 3, 2]
gives you the result (32)2=81 - To obtain the repeated addition of 7 to the number 3: if g(x) = x+7 then
Iteration[g, 3, 4]
yields (((3+7) +7) +7) +7 = 31.
- After defining