Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2009-12-07
年龄: 38
帖子: 7
声望力: 0 ![]() |
![]()
如何用ode解这个微分方程组?
我最近正在计算这个lic方程组 dy1/dx=y2*y3 dy2/dx=-y1*y3 dy3/dx=-0.5y1*y2 dy4/dx=4y2*y4 初始值是y1(0)=1;y2(0)=0.26;y3(0)=1e-9;y4(0)=1e-15; 考虑使用ode45函数, tspan=linspace(x0,xf,45000); [T,Y]=ode45('lic',tspan,[y1 y2 y3 y4]); 可是运行出来之后提示错误, ??? Error using ==> lic Too many input arguments. Error in ==> funfun\private\odearguments at 110 f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0. Error in ==> ode45 at 173 [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ... Error in ==> figure1 at 25 [T,Y]=ode45('lic',tspan,[y1 y2 y3 y4]); 我明白是因为输入初值过多。 可是我该怎么改,才能运行? |
![]() |
![]() |