function ydot = lotka(t, y) % LOTKA : function to be integrated to solve an ODE % % ydot = lotka(t, y) % t is a scalar time % y is a vector of variables % ydot is the vector dy/dt % % Lotka-Volterra equations % % y = [rabbits(t); foxes(t)] alpha = .01; ydot = [2*y(1) - alpha * y(1) * y(2); ... -y(2) + alpha * y(1) * y(2)];