function orb=logorbit(a,x0,n)
% Generate the orbit [x0 x1 x2 ... xn] for the logistic map
% with parameter a.

orb = zeros(1,n+1);
orb(1) = x0;

for i=1:n,
  x = orb(i);
  orb(i+1) = a*x*(1-x);
end
