function iter2(f,N)
% m-file to test iterative maps: implements cobweb construction, including
% transients, for general map without parameter; see iter1.m for usage
%
yy = 0:0.05:1; 
figure(1) ; clf ; 
plot(yy,feval(f,yy),'-',yy,yy,'--')
hold on
x = 0.3;          % Initial value
Xn = [];
%r = 2;           % Bifurcation parameter
plot([x x],[0 x],'r-')  % First line, to get to diagonal
for i = 1:N
    x1 = feval(f,x);
    Xn = [Xn x1];
    plot([x x],[x x1],'r-',[x x1],[x1 x1],'r-')
    x = x1;
end
hold off