def ansQuest(maxTime,numTrials):
means=[]
distLists=performSim(maxTime,numTrials)
for t in range(maxTime+1):
tot=0.0
for distL in distLists:
tot+=distL[t]
means.append(tot/len(distL))
pylab.figure()
pylab.plot(means)
pylab.xlabel('distance')
pylab.ylabel('time')
pylab.title('Average Distance vs. Time ('+str(len(distLists))+'trials)')
random_walk.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录