function dy=Colpitts(t,y)

% Colpitts oscillator

alpha=1;
beta=200;
gam=-20/3;
delta=5.5;
epsilon=20/3;
rho=2;
r=0.25;
dy=zeros(3,1);

% Nonlinearity
if y(2)<=1
   f=0;
else
   f=y(2)-1;
end
   
% System
dy(1)=y(3)-beta*f;
dy(2)=alpha*(-r*(y(2)+gam)-y(3)-f);
dy(3)=delta*(-y(1)+y(2)+epsilon)-rho*y(3);      


% "Complex and Chaotic Nonlinear Dynamics. 
% Advances in Economics and Finance, 
% Mathematics and Statistics" 
% T.Vialar, Springer 2009
% Copyright(c).
