I am attempting to generate two vectors, tv and Yv, to plot a series of differential equations. Given my funciton:
function dydt=Tcells(t,y)
dydt(1,1)=(10 + 0.03*y(1)*(1-y(1)/t) – 0.02*y(1) – (2.4e-5)*y(4)*y(1));
dydt(2,1)=(2.4e-5)*y(4)*y(1) – 0.02*y(2) – (3e-3)*y(2);
dydt(3,1)=(3e-3)*y(2) – 0.24*y(3);
dydt(4,1)=1400*y(3) – 2.4e-5*y(4)*y(1) – 2.4*y(4);
and the following ode45 script entry:
[tv, Yv]=ode45('Tcells',[0 1500],[500, 0, 0, 1000]);
I cannot figure out why all entries of Yv, save the first row, return NaN as their values.
Any and all help is appreciated.
Best Answer