其他分享
首页 > 其他分享> > 作业四作业四作业四

作业四作业四作业四

作者:互联网

import matplotlib.pyplot as plt

x = 0
y = 1
lx=[]
ly=[]
for i in range(100):
    y =1.1*y -0.2*x/y
    x=x+0.1
    lx.append(x)
    ly.append(y)
print(lx)
print(ly)

fig = plt.figure()
ax = fig.add_subplot(111)
ax = ax.plot(lx,ly)
plt.show()

 

 1.1, 1.191818181818182, 1.277437833714722, 1.35821259956029, 1.4351329186577972, 1.5089662535663324, 1.580338237655218, 1.6497834310477122, 1.717779347860088, 1.7847708324979834, 1.8511887110822296, 1.917465025144291, 1.984046272046332, 2.0514055684725467, 2.1200543441219546, 2.190553971934533, 2.2635275998130764, 2.339672339345207, 2.419771873967288, 2.504709464330856, 2.595481249764899, 2.6932096736597324, 2.7991568033689833, 2.914737281245499, 3.0415306441486285, 3.181292795402083, 3.335966513495211, 3.507691036387956, 3.6988109593575618, 3.9118849066249957, 4.149694651664416, 4.415255533297773, 4.711829113820219, 5.042939033576937, 5.412390933993009, 5.824297167194873, 6.283106817950801, 6.793641370604512, 7.36113619361956, 7.991287909888882, 8.690307681027537, 9.464980455133118, 10.322730298367317, 11.271692036022365, 12.320789553742157, 13.479821242455882, 14.759553203479546, 16.1718209590997, 17.72964053779977, 19.447329923268757, 21.340641974831755, 23.42691004691238, 25.725207659648923, 28.256523704780307, 31.04395481310721, 34.11291666469445, 37.491376192797986, 41.21010681943666, 45.30296906669943, 49.80721911541924, 54.76384813397673, 60.217955477080224, 66.21915915995032, 72.82204735019371, 80.08667499082237, 88.07911007670793, 96.87203455693935, 106.54540533113622, 117.18718135323435, 128.89412345653736, 141.77267417434913, 155.93992555725364, 171.52468378767807, 188.66864027201905, 207.52765985831195, 228.2731978919703, 251.0938589931828, 276.19711172777073, 303.8111747603836, 334.18709163772365, 367.60101306420745, 404.3567074186819, 444.7883223356561, 489.26342245685134, 538.1863309694535, 592.0018053091021, 651.199080443467, 716.3163164938686, 787.9454911281639, 866.7377812014655, 953.4094825689436, 1048.748521887409, 1153.6216196040705, 1268.982169250727, 1395.878904673502, 1535.4654339912613, 1689.0107269552052, 1857.9106510493766, 2043.7006612058437, 2248.0697584957]

标签:plt,作业,append,fig,ax,lx,ly
来源: https://blog.csdn.net/antepenultimate/article/details/120356661