Freidenker
Industrial
- Oct 11, 2007
- 1
Hello,
I have a simple system of ODE;
function xdot=test(t,x);
xdot=[
2*x(1)*(1-x(1)/2000)-(15*x(1)*x(2))/(x(1)+70);
1*x(2)*((15*x(1))/(x(1)+70)-9)];
return;
tspan=[0 50]; x0=[1000;20];
options=odeset('RelTol',0.01);
[t,x]=ode23('test',tspan,x0,options);
plot(t,x, '-')
xlabel('time');
ylabel('size');
As you can see, the RelTol is very high, still, I can't plot this, it says "busy" and it waits, waits, waits... nothing happens. I really can't understand, it's a simple system !
BTW, how can I put all the programs in a single m file ?
Thank you,
I have a simple system of ODE;
function xdot=test(t,x);
xdot=[
2*x(1)*(1-x(1)/2000)-(15*x(1)*x(2))/(x(1)+70);
1*x(2)*((15*x(1))/(x(1)+70)-9)];
return;
tspan=[0 50]; x0=[1000;20];
options=odeset('RelTol',0.01);
[t,x]=ode23('test',tspan,x0,options);
plot(t,x, '-')
xlabel('time');
ylabel('size');
As you can see, the RelTol is very high, still, I can't plot this, it says "busy" and it waits, waits, waits... nothing happens. I really can't understand, it's a simple system !
BTW, how can I put all the programs in a single m file ?
Thank you,