Selasa, 07 Agustus 2012

[bs] Henon Map



The Hénon map is a discrete-time dynamical system. It is one of the most studied examples of dynamical systems that exhibit chaotic behavior .


Algoritma pemrograman :

clear all
n = 0;

x = 0;
y = 0;
a = 1.36;
b = 0.3;

while n <= 400;
n = n+1;
x1 = x;
y1 = y;
y = b.*x1;
x = y1+1-a.*x1.^2;
xx(n) = x;
yy(n) = y;
end

plot(xx,yy,'r.-')
hold on
grid on
xlabel('x')
ylabel('y')
title('henon map')



Alternatif lain :




clc
clear all

a = 1.4;
b = 0.3;

x0 = 0;
y0 = 0;

k1 = 2000;                   
k2 = 8000;                   

data = zeros(k1+k2,2);
for i = 1:k1+k2
    x = 1 - a * x0^2 + y0 ;
    y = b * x0;
    x0 = x;
    y0 = y;
    
    data(i,1) = x;
    data(i,2) = y;
end
data = data(k1+1:end,:);

X = data(:,1);
Y = data(:,2);

figure(1)
plot(X,Y,'b.','MarkerSize',3)
axis equal
axis([1.1*min(X) 1.1*max(X) 1.1*min(Y) 1.1*max(Y)])
xlabel('X','FontSize',12);ylabel('Y','FontSize',12)
title('Henon Map','FontSize',16)

Tidak ada komentar :