Added folgen und Reihen
This commit is contained in:
17
reihen_plot.py
Normal file
17
reihen_plot.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
f = lambda x_prev: 1/4 * (x - 3)
|
||||
x = 0
|
||||
|
||||
reihe = [x]
|
||||
|
||||
for i in range(100):
|
||||
x = f(x)
|
||||
reihe.append(x)
|
||||
|
||||
plt.plot(reihe, marker='o', linestyle='-')
|
||||
plt.title("Reihen Plot")
|
||||
plt.xlabel("n")
|
||||
plt.ylabel("x_n")
|
||||
plt.grid()
|
||||
plt.savefig("reihen_plot.png", dpi=500)
|
||||
Reference in New Issue
Block a user