Ältere Kommentare anzeigen
function dydt=xuexi(t,y,Cph,Cpl,Cp,Bt,Rp,Ft,Ct,Cg,Tg);
dydt=zeros(3,1);
dydt(1)=y(1)*(y(1)-1)*(cph-cpl-cp-bt-y(2)*(rp-bt)-y(3)*(fp+mp));
end
figure(1)
Rp=100,Cph=85,Cpl=0,Cp=10,Bt=40,Fp=40,Mp=20,Ct=10,Ft=20,Mt=15,Cg=15,Tg=40;
set(0,'defaultfigurecolor','w');
[t,y]=ode45(@(t,y)xuexi(t,y,Cph,Cpl,Cp,Bt,Rp,Ft,Ct,Cg,Tg),[0 50],[0.2 0.2 0.2]);
plot3(y(:,1),y(:,2),y(:,3),'r+','linewidth',1);
hold on;
这个是一部分,但是运行的时候提示:出错[t,y]=ode45(@(t,y)xuexi(t,y,Cph,Cpl,Cp,Bt,Rp,Ft,Ct,Cg,Tg),[0 50],[0.2 0.2 0.2]);也就是ode这一行有问题,想知道有什么问题?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 数学 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!