function iter1x(f,x0,N)
% m-file to test iterative maps - general function, without parameter; the
% initial condition x0 is specified.
% Usage example: iter1(f,20,0.3) (if an m-file f.m exists, which takes a single
% argument x); or for instance iter1('cos',20,0.3)
%
Xn = [];
%r = 2;
x = x0;
for i = 1:N
    x = feval(f,x);
    Xn = [Xn x];
end
figure(1) ; clf;
plot(1:N,Xn)
xlabel('Iteration Number')
ylabel('Xn')