How can I make condition on the outputs of ODE45????
1 次查看(过去 30 天)
显示 更早的评论
Dear friends;
I have to solve the initial value problem for a system of first order differential equations. I have created an M-file called funsys
function ydot=funsys(t,y) ydot=zeros(3,1); ydot(1)=2*y(1)+y(2)+5*y(3)+exp(-2*t); ydot(2)=-3*y(1)-2*y(2)-8*y(3)+2*exp(-2*t)-cos(3*t); ydot(3)=3*y(1)+3*y(2)+2*y(3)+cos(3*t); end
and I have typed the following command in an m file as follows
y0=[1 -1 0]; [t,y]=ode45(@funsys,[0 pi/2],y0);
this program works, but I need how to include a constraint in this program. This constraint is as follows
max(Y)=[a b c] min(Y)=[d e f] with a, b, c, d, e and f are known numbers. So, How can I make conditions on the outputs of ODE45 ?????
I need your help Thanks
1 个评论
Torsten
2015-1-13
What do you mean by "make conditions on the outputs of ODE45" ?
The solution of your ODE system is uniquely determined by the three equations you use ...
Best wishes
Torsten.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!