%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Math 3520: Differential Equations and Dynamical Systems % Compute and plot the Henon map strange attractor. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Henon mapping a = 1.4; b=0.3; % Henon's choices henon = @(X) [X(2)+1-a*X(1)*X(1), b*X(1)] ; % [y+1-ax^2, bx] N = 10000; % Generate N pairs (xn,yn) for plotting as points X=[0,0]; % Initial values [x0,y0] used by Henon for(i=2:N) X(i,:) = henon(X(i-1,:)); end figure; hold on; % New graph, accumulate points xmax=max(X(:,1)); ymax=max(X(:,2)); xmin=min(X(:,1)); ymin=min(X(:,2)); plot(xmin, ymin,"."); plot(xmax, ymax,"."); % big enough plot(X(:,1), X(:,2), "."); % plot trajectory title("Henon Map Iteration"); xlabel("Xn"); ylabel("Yn");