python的第一副图
在看《机械振动基础》时,看到老师的有一附图
试着自己做下,v1代码为:
1 from math import * 2 from numpy import * 3 import matplotlib.pyplot as plt 4 5 x = arange(0, math.pi, 0.00001) 6 #y0 = [(math.sqrt((1-s**2)**2))**(-1) for s in x] 7 y1 = [(math.sqrt((1-s**2)**2 + (2*s)**2))**(-1) for s in x] 8 y2 = [(math.sqrt((1-s**2)**2 + (2*0.5*s)**2))**(-1) for s in x] 9 y3 = [(math.sqrt((1-s**2)**2 + (2*0.375*s)**2))**(-1) for s in x] 10 y4 = [(math.sqrt((1-s**2)**2 + (2*0.25*s)**2))**(-1) for s in x] 11 y10 = [(math.sqrt((1-s**2)**2 + (2*0.1*s)**2))**(-1) for s in x] 12 plt.figure() 13 plt.plot(x, y1, color='r') 14 plt.plot(x, y2, color='b') 15 plt.plot(x, y3, color='g') 16 plt.plot(x, y4, color='y') 17 plt.plot(x, y10) 18 plt.show()
图形如下:
人就像是被蒙着眼推磨的驴子,生活就像一条鞭子;当鞭子抽到你背上时,你就只能一直往前走,虽然连你也不知道要走到什么时候为止,便一直这么坚持着。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
2021-09-15 markdown中的公式