Hénon Map MATLAB

In my studying of dynamical systems I stumbled upon the Hénon Map today, a two-dimensional dynamical system with a strange attractor which demonstrates chaotic behaviour. The system is described by a coupled pair of equations. Here’s what the classical version looks like:

Classic Hénon

The classical Hénon Map.

There are only two parameters, but playing around with them yields some interesting results:

Hénon

A variation of the Hénon Map

Hénon Map

Another variation of the Hénon Map

Another variation of the Hénon Map

Yet another variation of the Hénon Map

Again, the code to implement this is pretty simple, so I’ll post it here as opposed to GitHub (though I’ll probably post a version on GitHub which draws the system state after each iteration):

a = 1.4;
b = 0.3;
iterations = 10000;
x = zeros(1, iterations);
y = zeros(1, iterations);
% simulation
for i=1:iterations
x(1,i+1) = 1-(a*x(1,i)^2) + y(1,i);
y(1,i+1) = b*x(1,i);
end
% plotting
plot(x(5:iterations),y(5:iterations), '.k','MarkerSize',3)
line1 = sprintf('Henon Map with %.0f iterations', iterations);
line2 = sprintf('a = %.2f, b = %.5f', a, b);
title({line1, line2});
xlabel('x')
ylabel('y')

Advertisements