function n = pp_shape(r1,K,c,a,Th, C) %This is a function plotting two lines of the prey dynamics (growth and predation under given predator level) %Prey: %r1 - intrinsic growth rate %K - prey carrying capacity %Predator: %c - prey conversion rate %a - encounter rate %Th - handling time %C - predator population size %nostep - number of steps for simulation nobin=100; x=[]; y1=[]; y2=[]; for tt=0:K/nobin:K x=[x tt]; y1= [y1 r1*tt*(K-tt)/K]; y2= [y2 C*(a*tt^2/(1+a*Th*tt^2))] ; end plot(x,[y1;y2]) xlabel('Prey density'); ylabel('Prey density change');