%Graph of F (or F^2, or F^3 or F^4) and y=x as the parameter c is changed %through some of the bifurcation values. cvals=1/2:-0.05:-1.5; N=length(cvals); %Number of plots in the animation x=linspace(-2,2,200); %Domain of the plot- the interval from -2 to 2 for j=1:N y1=x.^2+cvals(j); y2=y1.^2+cvals(j); y3=y2.^2+cvals(j); y4=y3.^2+cvals(j); plot(x,x,x,y4); %Change the last entry to y1, y2, y3 or y4 % These correspond to F, F^2, F^3, F^4 axis([-2,2,-2,2]); fprintf('c value is %f \n',cvals(j)) pause end