|
<>菜鸟请教各位MATLAB高手:</P>
<>求下列高阶微分方程的数值解:</P>
<>h''(t)*1050=1/2*(0.00025*h^2-0.0107045*h+0.<BR>0124)*h'(t)^2*26.67;<BR>h(t)=20000;h'(t)=100;</P>
<P>我是这样解的:</P>
<P>定义了一个函数: </P>
<P>function dy=ly2(t,y)<BR>dy=zeros(2, 1);<BR>dy(1)=y(2);<BR>dy(2)*1050=0.5*0.645*(0.00025*y(1)^2-0.0107045*y(1)+0.0124)*y(2)^2*26.67;</P>
<P>然后运行脚本命令:</P>
<P>[T Y]=ode23t('ly',[0 1000],[20000 100]);<BR>plot(T,Y(:,1),'-',T,Y(:,2),'+');</P>
<P>但显示的错误信息是:</P>
<P><FONT color=#f70909>??? Error: File: C:\MATLAB6p5\work\ly.m Line: 4 Column: 11<BR>Missing operator, comma, or semicolon.</FONT></P>
<P><FONT color=#f70909>Error in ==> C:\MATLAB6p5\toolbox\matlab\funfun\private\odearguments.m<BR>On line 76 ==> if (nargin(ode) == 2) </FONT></P>
<P><FONT color=#f70909>Error in ==> C:\MATLAB6p5\toolbox\matlab\funfun\ode23t.m<BR>On line 202 ==> [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, args, ...</FONT></P>
<P><FONT color=#f70909>Error in ==> C:\MATLAB6p5\work\LY0.m<BR>On line 1 ==> [T Y]=ode23t('ly',[0 1000],[20000 100]);<BR></FONT></P>
<P>这是什么意思呀,如何修改呀?或者怎样才能更好的实现呀!</P>
<P>特别是第一个错误,搞不懂,仔细检查下好象没有少什么东西.</P> |
|