Differenze tra le versioni di "Comando IterazioneLista"

Da GeoGebra Manual.
Riga 6: Riga 6:
 
;IterazioneLista[Espressione, Nome variabile, ..., Valori iniziali, Numero di iterazioni]
 
;IterazioneLista[Espressione, Nome variabile, ..., Valori iniziali, Numero di iterazioni]
 
: Gives you a list of length ''n+1'' whose elements are iterations of the expression starting with the start value. Variables in the expression are substtituted by last elements of the list in each iteration. There should be at least as many start values as there are variables, otherwise the result is undefined.
 
: Gives you a list of length ''n+1'' whose elements are iterations of the expression starting with the start value. Variables in the expression are substtituted by last elements of the list in each iteration. There should be at least as many start values as there are variables, otherwise the result is undefined.
{{Example|1=Let A,B be points. Then <code>IterationList[Midpoint[A, C], C,{B},3]</code> internally computes values C<sub>0</sub>=B,  
+
:{{Example|1=<div>Let A,B be points. Then <code>IterationList[Midpoint[A, C], C,{B},3]</code> internally computes values C<sub>0</sub>=B, C<sub>1</sub>=Midpoint[A, C<sub>0</sub>], C<sub>2</sub>=Midpoint[A, C<sub>1</sub>], C<sub>3</sub>=Midpoint[A, C<sub>2</sub>] and yields {C<sub>0</sub>, C<sub>1</sub>, C<sub>2</sub>, C<sub>3</sub>}. <br>Hence for A=(0,0) and B=(8,0) the result will be {(8,0), (4,0), (2,0), (1,0)}.</div>}}
C<sub>1</sub>=Midpoint[A, C<sub>0</sub>]
+
 
C<sub>2</sub>=Midpoint[A, C<sub>1</sub>]
+
:{{Example|1=<div>Let f_0,f_1 be numbers. <code>IterationList[a+b, a,b,{f_0,f_1},5]</code> fills the first 2 values of the resulting list from the start values. Afterwards the values are computed as: f<sub>2</sub>=f<sub>0</sub>+f<sub>1</sub>, f<sub>3</sub>=f<sub>1</sub>+f<sub>2</sub>, f<sub>4</sub>=f<sub>2</sub>+f<sub>3</sub>, f<sub>5</sub>=f<sub>3</sub>+f<sub>4</sub>. <br>For f_0=f_1=1 the resulting list will be {1,1,2,3,5,8}.<\div>}}
C<sub>3</sub>=Midpoint[A, C<sub>2</sub>]
 
and yields {C<sub>0</sub>, C<sub>1</sub>, C<sub>2</sub>, C<sub>3</sub>}. Hence for A=(0,0) and B=(8,0) the result will be {(8,0), (4,0), (2,0), (1,0)}.}}
 
{{Example|1=Let f_0,f_1 be numbers. <code>IterationList[a+b, a,b,{f_0,f_1},5]</code> fills the first 2 values of the resulting list from the start values. Afterwards the values are computed as  
 
f<sub>2</sub>=f<sub>0</sub>+f<sub>1</sub>,
 
f<sub>3</sub>=f<sub>1</sub>+f<sub>2</sub>,
 
f<sub>4</sub>=f<sub>2</sub>+f<sub>3</sub>,
 
f<sub>5</sub>=f<sub>3</sub>+f<sub>4</sub>.
 
For f_0=f_1=1 the resulting list will be {1,1,2,3,5,8}.}}
 
 
{{Note|1=Vedere anche il comando [[Comando Iterazione|Iterazione]].}}
 
{{Note|1=Vedere anche il comando [[Comando Iterazione|Iterazione]].}}

Versione delle 10:28, 9 ago 2015



IterazioneLista[Funzione, Valore iniziale, Numero di iterazioni]
Genera una lista di lunghezza n+1 (con n = numero di iterazioni) i cui elementi sono le iterazioni della funzione a partire dal valore iniziale indicato.
Esempio: Sia f(x) = x^2: il comando IterazioneLista[f, 3, 2] genera la lista L = {3, 9, 81}.
IterazioneLista[Espressione, Nome variabile, ..., Valori iniziali, Numero di iterazioni]
Gives you a list of length n+1 whose elements are iterations of the expression starting with the start value. Variables in the expression are substtituted by last elements of the list in each iteration. There should be at least as many start values as there are variables, otherwise the result is undefined.
Esempio:
Let A,B be points. Then IterationList[Midpoint[A, C], C,{B},3] internally computes values C0=B, C1=Midpoint[A, C0], C2=Midpoint[A, C1], C3=Midpoint[A, C2] and yields {C0, C1, C2, C3}.
Hence for A=(0,0) and B=(8,0) the result will be {(8,0), (4,0), (2,0), (1,0)}.
Esempio:
Let f_0,f_1 be numbers. IterationList[a+b, a,b,{f_0,f_1},5] fills the first 2 values of the resulting list from the start values. Afterwards the values are computed as: f2=f0+f1, f3=f1+f2, f4=f2+f3, f5=f3+f4.
For f_0=f_1=1 the resulting list will be {1,1,2,3,5,8}.<\div>
Note: Vedere anche il comando Iterazione.
© 2024 International GeoGebra Institute