TI-82 Program LOGISTIC


This program will simulate the bead model for logistic growth. The program asks for an input of the population capacity of the environment. Each member of the current census adds one to the current population with probability proportional to the difference of the present population and the population capacity. The census number is stored in L1, the population total is stored in L2 and the population change is stored in L3.

   PROGRAM:LOGISTIC
   :Disp "CAPACITY"
   :Input C
   :1 -> I
   :0 -> L1(1)
   :1 -> L2(1)
   :1 -> J
   :While J < C
   :For(K,1,L2(I),1)
   :If rand < (C-J)/C
   :J+1 -> J
   :End
   :J-L2(I) -> L3(I)
   :J -> L2(I+1)
   :I -> L1(I+1)
   :I+1 -> I
   :End