% Input r and 0 &lt; x0 &lt; 1
% This program will iterate r*x*(1-x) 100 times
% ª`·N r=3 ªþªñªºª¬ªp
%
% ³æºû¹ü¼g©ó 2000/01/07

x = zeros(1,101);      % ±N x §Ç¦CÂk¹s
x(1)=x0;
for n=1:100, x(n+1) = r * x(n) * (1-x(n)); end;
x(101)
plot(x)
axis([1 101 -0.2 1.2])
