目录

解题思路

一:题目

二:思路

开发环境

代码及效果

一:代码

二:效果


解题思路

一:题目

  

二:思路

由于给定了微分方程组的具体表达式和参数,我们使用odeint()得到h(t)积分后的方程,并带入t的数值解,来建立方程图形。

开发环境

vscode python

代码及效果

一:代码

from cmath import e
from matplotlib.pyplot import xlabel, ylabel
import scipy
from scipy.integrate import odeint
import pylab as plt
import numpy as np
t=np.arange(0,1200000,100)#设置t的取值范围
#函数的方程式。
ppt2 =lambda h,t:0.62*np.sqrt(2*980*h)/(-np.pi*(200*h-h**2))
y=odeint(ppt2,100,t)#求数值解。
print(y)
plt.rc('font',size='16')
plt.plot(t,y[:,0])
plt.show()

二:效果

效果

  • 结果:h1m=100cm,t对应100倍t,g对应298,
  • ppt =lambda h,t:np.sqrt(2*980*h)/(-np.pi*(200*h-h**2))
  • [[100.        ],[99859079],[99.99718158] ...[         nan]]

 

Logo

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。

更多推荐