import numpy as np
import matplotlib.pyplot as plt
import math
x = 0
y = 1
xx = np.linspace(0, 10, 100)
yy = np.linspace(0, 10, 100)
for i in range(100):
y = 1.1 * y - 0.2 * x/y
x = x+0.1
xx.append(x)
yy.append(y)
print(xx)
print(yy)
fig = plt.figure()
ax = fig.add_subplot(111)
ax = ax.plot(xx, yy)
plt.show()
欧拉公式优化
最新推荐文章于 2024-09-04 10:52:36 发布