function dN = logisticgrowth(t,N) global r K dN = r*(1-N/K)*N