%**********************************************************
%**                   pokusy s fraktály                  **
%**                   Lorenzùv atraktor                  **
%** Leos Marsalek (c) 2002-2003 Leos.Marsalek@tiscali.cz **
%**********************************************************
tic;
x(1)=rand*30+5;                 
%pocatecni podminky
y(1)=rand*35-3;
z(1)=rand*40-5;
for t=2:999                     %cyklus vypoctu
    
x(t)=x(t-1)+0.003*10*(y(t-1)-x(t-1));
    y(t)=y(t-1)+0.003*(x(t-1)*(28-z(t-1))-y(t-1));
    z(t)=z(t-1)+0.003*(x(t-1)*y(t-1)-8/3*z(t-1));
end
plot3(x,y,z);                   %vykresleni grafu
toc;