% % Modified Nicholson - Bailey % % graphical identification of steady state % and phase-plane representation of 1st 20 % generations % % nicba(a,r,K) e.g. nicba(.15,.5,14.47) % function nicba(a,r,K) P = .01:.01:3; N = (K/r)*(r-a*P); plot(P,N) hold on N = P./(1-exp(-a*P)); plot(P,N,'r') xlabel('P','fontsize',16) ylabel('N','fontsize',16) [P,N] = ginput(1); gen = 20; text(P,N,'0') for g=1:gen nextN = N*exp(r*(1-N/K)-a*P); nextP = N*(1-exp(-a*P)); N = nextN; P = nextP; text(P,N,num2str(g)) end hold off return