function xdot=logisticdot(x,t)

global a e1 Tp e2 e3

%xdot=x*(1-x)-a*(1+e1*sin(2*pi*t/Tp)+e2*sin(4*pi*t/Tp)+e3*sin(6*pi*t/Tp));
if x>0
 %xdot=x*(1-x)-a*(1+e1*sin(2*pi*t/Tp)+e2*sin(4*pi*t/Tp)+e3*sin(6*pi*t/Tp));   
xdot=-x*log(x)-a*(1+e1*sin(2*pi*t/Tp)+e2*sin(4*pi*t/Tp)+e3*sin(6*pi*t/Tp));
else
xdot=0;
end


