AM107 | AM107
Homework 3
Assigned: Thursday, September 21, 2000 Due: Thursday, September 28, 2000 |
Problem 1:Edelstein-Keshet, p.104, Problem 10.
Problem 2:Edelstein-Keshet, p.105, Problem 11 (a-d).
Problem 3: The matlab program below runs the Nichelson-Bailey model.
a. For initial values N0=20, P=10 and T=22, what is the behaviour of this system. What does this tell us about the stability of the equilibrium solution? (Feel free to include a print-out of the output plot.)
b. Edit the program to simulate
the model derived in Problem 2. Explore the results and predictions
of this model.
function am107
% % The Nicholson-Bailey Model % % inputs: N0 - the initial host population % P0 - the initial parasite population % T - the total number of steps % % output: a graph of N0 vs P0, N0 and P0 vs time % and the final values N(T+1) and P(T+1) % % %Get the necessary variables% % N0 = input('Enter the initial host population, N0 = '); P0 = input('Enter the initial parasite population, P0 = '); T = input('Enter the total number of steps, T = '); lambda=2; a=0.069; c=1; % % *Note:For these parameters, % there is an equilibrium near N=20, P=10* % % *Initialize the variables* |
%
N = zeros(1,T+1); P = zeros(1,T+1); Time = 1:T+1; N(1) = N0; P(1) = P0; % % *Iterate Nicholson-Bailey* % for i=2:T+1 N(i) = lambda*N(i-1)*exp(-a*P(i-1)); P(i) = c*N(i-1)*(1-exp(-a*P(i-1))); end % % *Produce the promised output* % subplot(1,2,1) plot(N,P,'*') % subplot(1,2,2) plot(Time,N,'-*',Time,P,':o') % display(N(T+1)) display(P(T+1)) |