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!