%LVODE: MATLAB script M-file that solves and plots
%solutions for the Lotka-Volterra predator-prey 
%system with y1(0) = 30, y2(0) = 4, and the following
%parameter values:
a = .5571; b = .0282; c = .0264; r = .8296;
lvrhs = @(t,y) [a*y(1)-b*y(1)*y(2); -r*y(2)+c*y(1)*y(2)];
[t,y] = ode45(lvrhs,[0 20],[30;4])
subplot(2,1,1)
plot(t,y(:,1))
title('Prey Population','interpreter','latex','FontSize',16)
xlabel('Years','interpreter','latex','FontSize',14)
subplot(2,1,2)
plot(t,y(:,2))
title('Predator Population','interpreter','latex','FontSize',16)
xlabel('Years','interpreter','latex','FontSize',14)