1 % PROGRAM theta_logistic.m
2 % Calculates by simulation the probability that a population
3 % following the theta logistic model and starting at Nc will fall
4 % below the quasi-extinction threshold Nx at or before time tmax
5 % SIMULATION PARAMETERS
6 % for butterflies (Euphydryas editha bayensis) at Jasper Ridge (population C)
9 % ComputeS quasi-extinction probability as the fraction of replicate
10 % populations that have hit the threshold by each future time,
11 % and plotS quasi-extinction probability vs. time
12 % Integrate solution exactly %
14 % [T,true] = ode45(@logistic,[0,20],Nc,Options,r,K,theta);
16 % plot([1:tmax],P,'r.-',T,true,'g.-')