How can I make condition on the outputs of ODE45????
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Torsten
il 13 Gen 2015
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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Ordinary Differential Equations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!