function G=extcdf(mu,sigma2,d,tmax); % extcdf(mu,sig2,d,tmax) calculates the unconditional extinction time % cumulative distribution function from t=1 to t=tmax for mean and % variance parameters mu and sigma2 and log distance from the % quasi-extinction threshold d; modified from Lande and Orzack, % Proc. Nat. Acad. Sci. USA 85: 7418-7421 (1988), equation 11. % REQUIRES THE FILE stdnormcdf.m for t=1:tmax G(t)=stdnormcdf((-d-mu*t)/sqrt(sigma2*t)) + ... exp(-2*mu*d/sigma2)*stdnormcdf((-d+mu*t)/sqrt(sigma2*t)); end;