% circle map in matlab, Eli Tziperman
clear; clf
pi=atan(1.0)*4.0;
omega=0.64;  % 0.35, 0.64
K=0.98;      % 0.98
titlestring=sprintf('\\Omega=%6.4g; K=%6.4g;',omega,K);
I=250;

theta(1:I)=0.3001;

for n=1:I
  theta(n+1)=mod(theta(n)+omega+(K/(2*pi))*sin(2*pi*theta(n)),1);
end

plot(theta,'r-')
hold on;
plot(theta,'b+')
title(['circle map: ' titlestring])
ylabel('\theta_n')
xlabel('n')
%hold on

