首页 > 编程知识 正文

一阶微分方程组求解,ode13能不能解微分

时间:2023-05-04 09:39:47 阅读:136601 作者:241

首先,说明ode45的格式。

[t,y]=ode45(odefun,tspan,y0 ) [t,y]=ode45 ) odefun,tspan,y0,options ] [ t,y,te,ye,ie]=ode45

[自变量、因变量]=ode45 (方程式、范围、初始值);

提心吊胆:

首先,创建func2.m函数存储表达式

functionbiubiu=func2(h,t ) g=9.8; biubiu=(10000*pi/sqrt )2*g ) ) h.^(3/2)-2 * (h.^ )1/2) ); 结束

然后在MATLAB命令窗口中键入以下内容:

tspan=[1 0]; %函数范围t_1=0; %初始值[h,t]=ode45(@func2,hspan,t_1); plot(h,t ); %图

可以丰富图像,增加横坐标名称、纵坐标名称和标题

xlabel(h值) (ylabel ) y值) (title ) (一阶微分方程) )。

3358 www.Sina.com/: https://WW2.mathworks.cn/help/MATLAB/ref/ode 45.html? s_tid=doc_ta

转载于:https://www.cn blogs.com/mayfly-nymph/p/10598998.html

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。