Borrar filtros
Borrar filtros

How can I make condition on the outputs of ODE45????

1 visualización (últimos 30 días)
yosra welhazi
yosra welhazi el 12 de En. de 2015
Comentada: Torsten el 13 de En. de 2015
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 comentario
Torsten
Torsten el 13 de En. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by