function chaos
% tato funkce animuje kmitavy pohyb bodu s linearne rostouci frekvenci
n = 40;
dL = 0.5;
L = n*dL;
u = zeros(n,1);
y = linspace(0,L,n);
om = 1+linspace(0,1,n);

figure('position',[300 50 100 fix(50*L)-100])
tisk = plot(u,y,'marker','o','markerfacecolor','b','markersize',20*dL,'linestyle','none');
axis equal;
axis([-1.3 1.3 -dL L+dL]);
axis off

t = 0;
dt = 0.02;
while 1
    u = sin(om*t);
    set(tisk,'Xdata',u);
    drawnow;
    t = t + dt;
end