function yp = logistic(t,y)
   global r;
   yp=r*y*(1-y);
end