 #1
 17
 0
Hi ,
I have tried solving the following system of ODE's (eq1 attached) using Matlab.
first i reduced it into a system of four 1st order ODE's (eq2 attached).
thani tried to solve it using ode45() in the following manner:
function xprime = Mirage(t,x);
k=2;
xprime=[x(1); k*(1x(1).^2)./(1+k*x(2)); x(3) ; (k*x(1)*x(3))./(1+k*x(2))];
end
x0=[1 1 1 1];
tspan=[0,20];
[t,x]=ode45(@Mirage,tspan,x0)
the program seem to be in infinite loop(stays Busy).
where did i wrong?
i will appreciate your help.
I have tried solving the following system of ODE's (eq1 attached) using Matlab.
first i reduced it into a system of four 1st order ODE's (eq2 attached).
thani tried to solve it using ode45() in the following manner:
function xprime = Mirage(t,x);
k=2;
xprime=[x(1); k*(1x(1).^2)./(1+k*x(2)); x(3) ; (k*x(1)*x(3))./(1+k*x(2))];
end
x0=[1 1 1 1];
tspan=[0,20];
[t,x]=ode45(@Mirage,tspan,x0)
the program seem to be in infinite loop(stays Busy).
where did i wrong?
i will appreciate your help.
Attachments

3.9 KB Views: 353

5 KB Views: 421