%Sample to produce the histogram in the text. xinit=0.1; Nx(1)=xinit; x=xinit; for i=2:20000 %NOTE: This could take a minute or two to run Nx(i)=x.^2-2; x=Nx(i); end hist(Nx,400); %The text said to use 400 bins in the histogram.