% Lorentz atractor
clear
%x=zeros(3,1);
function y = lorenz(x,t)
sigma=10;
#r=28;
r=99.96;
b=8/3;
y = [sigma * (x(2) - x(1)); 
x(1) * (r - x(3))-x(2); 
x(1) * x(2) - b * x(3)];
endfunction
t=(0:0.01:60)';
lr = lsode("lorenz", [3;14;50], t);
clearplot
# __gnuplot_set__ noborder
# __gnuplot_set__ noxtics
# __gnuplot_set__ noytics
# __gnuplot_set__ noztics
__gnuplot_set__ nokey
plot3(lr(:,1),lr(:,2),lr(:,3));
# __gnuplot_set__ xzeroaxis lt -1
# __gnuplot_set__ tics out
# __gnuplot_set__ grid
# __gnuplot_set__ mxtics
# __gnuplot_set__ mytics
# % popisky obrazku
# __gnuplot_set__ xlabel "t/s"
# __gnuplot_set__ ylabel "x/cm"
# __gnuplot_set__ decimalsign ","
# plot(t,lr(:,1))	
