import matplotlib.pyplot as plt
x1 =[]
y1 =[]defhe(x, y, t):for i inrange(t):
y =1.1* y -0.2* x / y
x = x +0.1
x1.append(x)
y1.append(y)print(x, y)
he(0,1,100)
plt.plot(x1, y1)
plt.show()
题目公式推导简化代码import matplotlib.pyplot as pltx1 = []y1 = []def he(x, y, t): for i in range(t): y = 1.1 * y - 0.2 * x / y x = x + 0.1 x1.append(x) y1.append(y) print(x, y)he(0, 1, 100)plt.plot(x1, y1)