% Test the delta-epsilon map for many iterations.
function delta_eps_test

x(1) = rand
Niterations = 1000000

tic
for i=2:Niterations/10
   x(i) = delta_eps(x(i-1));
end
toc

figure(1)
hold off
plot(x, '.')
xlabel('Iteration, n')
ylabel('x_n')
print('delta_eps_first10pct.pdf','-dpdfwrite')

tic
for i=(Niterations/10+1):Niterations
   x(i) = delta_eps(x(i-1));
end
toc

figure(2)
hold off
hist(x,100)
xlabel('x')
ylabel('number of occurrences')
print('delta_eps_histogram.pdf','-dpdfwrite')

figure(3)
hold off
plot(Niterations*0.9:Niterations, x(Niterations*0.9:Niterations), '.')
xlabel('Iteration, n')
ylabel('x_n')
print('delta_eps_last10pct.pdf','-dpdfwrite')
