function ppmodel(a,br,df)

%%  Jorge Cortes and William Dunbar

%%  Applied Mathematics and Statistics
%%  University of California at Santa Cruz
%%  jcortes@soe.ucsc.edu

%%  Computer Engineering
%%  University of California at Santa Cruz
%%  dunbar@soe.ucsc.edu
	
%%  Copyright (c) July 2005, William Dunbar, Jorge Cortes
%%  Permission is granted to copy, modify and redistribute this file, 
%%  provided that this header message is retained.

Periods = 365;
N = 90 * Periods;
%% Years = [1845:1:1935];
Rabbits(1) = 20;
Foxes(1) = 35;
Years(1) = 1845;
for k=1:N
    Rabbits(k+1) = Rabbits(k) + br*Rabbits(k)/Periods - a*Foxes(k)*Rabbits(k)/Periods;
    Foxes(k+1) = Foxes(k) - df*Foxes(k)/Periods + .5*a*Foxes(k)*Rabbits(k)/Periods;
    Years(k+1) = Years(k) + 1/Periods;
end
plot(Years,Rabbits,Years,Foxes,'-.')
legend('Hares','Lynxes')
