matlab程序求助(有关ode15s解微分方程的)
主程序:
xO=[0.3x050,3x050.4325];
tf=13;
opts=odeset('Mass','M','MassSingular','yes');
[t,x]=ode15s('residu',[0tf],xO,opts);
x1=x(:,1);
x2=x(:,2);
plot(x1,x2,'k')
A=x(:,1:3);
tf=30;
[t,x]=ode15s('residu2',[0tf],xO,opts);
x1=x(:,1);
x2=x(:,2);
plot(x1,x2,'k')
B=x(:,1:3);
n=length(x);
C=zeros(n,3);
fori=1:n
C(n-i+1,:)=B(i,:);
end
C(n,:)=[];
D=[C;A];
结果:
Errorusing==>odeargumentsat117
SolvingRESIDUrequiresaninitialconditionvectoroflength5.
Errorin==>ode15sat228
[neq,tspan,ntspan,next,t0,tfinal,tdir,y0,f0,odeArgs,odeFcn,...
Errorin==>calresdat47
[t,x]=ode15s('residu',[0tf],xO,opts);
本人matlab小白一名啊!