function iterp1(f,r,N)
% m-file to test iterative maps - general function, with parameter
% The function argument f = f(x,r) should be passed via a function handle,
% and should be defined in a function m-file f.m 
% Usage example: iterp1(@f,2.4,30)
%
Xn = [];
% r = 0.2
x = 0.3;
for i = 1:N
    x = feval(f,x,r);
    Xn = [Xn x];
end
figure(1) ; clf;
plot(1:N,Xn)
xlabel('Iteration Number')
ylabel('Xn')