%% Solving a Predator-Prey model with logistic growth of prey
% by Radu C. Cascaval, written Jan 28, 2016

clf

A=0.4; B=0.01; C=0.3; D=0.005; E=0.0001;
xf=7;
RHS=@(t,X) [A*X(1)-B*X(1)*X(2)-E*X(1)^2; -C*X(2)+D*X(1)*X(2)];

X0=[80;30];

[t,Xplot] = ode45(RHS,[0 100],X0);
plot(Xplot(:,1), Xplot(:,2))
xlabel('prey')
ylabel('predator')



