|
@@ -4,13 +4,16 @@ import sys |
|
|
|
|
|
|
|
|
k = float(sys.argv[1]) |
|
|
k = float(sys.argv[1]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def f(x): |
|
|
def f(x): |
|
|
return k * x * (1-x) |
|
|
|
|
|
|
|
|
return k * x * (1 - x) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x0 = 0.5 |
|
|
x0 = 0.5 |
|
|
|
|
|
|
|
|
n = 200 |
|
|
n = 200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def liste(n): |
|
|
def liste(n): |
|
|
resultat = [x0] |
|
|
resultat = [x0] |
|
|
for i in range(n): |
|
|
for i in range(n): |
|
@@ -18,8 +21,8 @@ def liste(n): |
|
|
return resultat |
|
|
return resultat |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
abscisses = list(numpy.linspace(0, 10, n+1)) |
|
|
|
|
|
|
|
|
abscisses = list(numpy.linspace(0, 10, n + 1)) |
|
|
ordonnées = liste(n) |
|
|
ordonnées = liste(n) |
|
|
|
|
|
|
|
|
pyplot.plot(abscisses, ordonnées) |
|
|
pyplot.plot(abscisses, ordonnées) |
|
|
pyplot.show() |
|
|
|
|
|
|
|
|
pyplot.show() |