% Usage: [X,Y] = henon(alpha, beta, X0, Y0, L);
%     
% X and Y are the output data 
% alpha, beta are the parameters of the Henon map.
% X0 and Y0 are the initial conditions.
% L is the length of iterations. 

function [X,Y] = henon(alpha, beta, X0, Y0, L)

X = zeros(L,1);         %initialize/zeroize X and Y
Y = zeros(L,1);

X(1) = X0;              % assign the input initial conditions 
Y(1) = Y0;

                        % compute the Henon map
for i=2:L;              
  X(i) = 1 + Y(i-1) - alpha*X(i-1)^2;
  Y(i) = beta * X(i-1);
end

