% The Nicholson-Baily Model of Host-Parasatoid System % % N(i+1) = lam*N(i)*exp(-a*P(i)) % P(i+1) = c*N(i)*(1 - exp(-a*P(i)) % % To use: % [X, xbar, J1] = NB(lam,a,c, x0,NTIME) % % Output matrix X holds values of N and P in 1st and 2nd rows - NTIME % columns % % xbar = gives the non-zero steady state values of N and P % % J1 = gives the Jacobian matrix evaluated at xbar % function [x, xbar,J1] = NB(lam,a,c, x0,NTIME) x(:,1) = x0; for i =1:NTIME x(1,i+1) = lam*x(1,i)*exp(-a*x(2,i)); x(2,i+1) = c*x(1,i)*(1 - exp(-a*x(2,i))); end xbar(1) = lam*log(lam)/(a*c*(lam-1)); xbar(2) = log(lam)/a; J1 = [1, -a*lam*xbar(1); 0, a*c*xbar(1)]; return