function logisticka(r,x0,N)

% logisticka(2,0.3,100)  %stabilno 1 stacionarno
% logisticka(2.8,0.3,100)  % stabilno 1 stacionarno
% logisticka(3.2,0.3,100)  % 2 tacke nagomilavanja
% logisticka(3.5,0.3,100)  % 4 tacke nagomilavanja
% logisticka(3.7,0.3,100)  % haos
% logisticka(3.83,0.3,100)  % 3 tacke nagomilavanja
% logisticka(3.85,0.3,100)  % 6 tacaka nagomilavanja
% logisticka(4,0.3,100)   % haos


x(1)=x0;
for i=1:N
    x(i+1)=r*x(i)*(1-x(i));
end

asimptota=(r-1)/r

plot(0:N,x,'r',0:N,x,'b.',0:N,ones(1,N+1)*asimptota)
xlim([0 100])
ylim([0 1])