% Driver for Henon

% Henon, M., 1976, A two-dimensional mapping with a strange attractor,
% Commun. Math. Phys., 50, 291.

% Equations:
% x_{i+1} = 1.0 - a*x_i*x_i + y_i
% y_{i+1} = b*x_i

% Written by Jim Hansen, Feb 2003 for 12.990 students

% Specify the dimension of the system
dim = 2;

% Specify the initial conditions
x = [0.1 0.2];

% Specify the parameter values (a, b)
par = [1.4 0.3];

% Specify the length of integration
steps = 2^12;

% Integrate the equations over length steps to remove any transient behavior
for i=1:steps
 xout=henon(x,par,dim);
 x=xout;
end

% Integrate the equations over length steps and record state for plotting
for i=1:steps
 xout=henon(x,par,dim);
 state(i,:)=xout;
 x=xout;
end

plot(state(:,1),state(:,2),'.')
xlabel('x');ylabel('y');title('Henon map');

print -djpeg90 henon.jpg
