npts = 101;
time = linspace(0, 10, npts);
z0 = [0; 0.05];
[time, z] = ode15s (@rhs, time, z0);
% start at long time solution and compute the limit cycle; period is
% about 6.5; exact value doesn't matter
z0 = z(end,:)';
time = linspace(0, 6.5, npts);
[time, zcyc] = ode15s (@rhs, time, z0);
% save trajectory and limit cycle and annulus
theta = linspace(0, 2*pi, npts)';
anni = [cos(theta), sin(theta)];
anno = 2/sqrt(5)*anni;
traj = [z, zcyc, anni, anno];
figure()
plot(time,z)
figure()
plot(z(:,1),z(:,2), '-', zcyc(:,1),zcyc(:,2), 'o', anni(:,1), ...
anni(:,2), anno(:,1), anno(:,2))
save "cycle.dat" traj