% % X[m+1] = rX[m](1-X[m]) % % Bifurcation Diagram, MATH499/599, Feb. 2007 Jae-Hun Jung plot(0,0),axis([0 5 0 1.2]), hold on xi = input('0<= x0 <=1, initial population = ? '); for r=0:0.1:4 x0=xi; for i = 1:300 x1 = r*x0*(1-x0); x0 = x1; if i>=100 plot(r,x0,'.'), plot(r,x1,'.') end end %pause(0.01) end