close all; clear; r=1; xn0=rand(1); N=100; orbit(1)=xn0; xn=xn0; for(n=2:N) xn=r*xn*(1-xn); orbit(n)=xn; end plot(orbit); axis([0, N, 0, 1]); hold on;