用python表示欧拉公式

用python表示欧拉公式_第1张图片

 

import matplotlib.pyplot as plt
x=0
y=1
xx=[0]
yy=[1]
for n in range(10):
    y = 1.1 * y - 0.2 * x / y
    x=x+0.1
    xx.append(x)
    yy.append(y)
print(plt.plot(xx,yy))
plt.show()

你可能感兴趣的:(python)