clear
close all
syms x

r=4;
f=r*x*(1-x);

n=2;
g=f;
for j=1:n-1
    g=compose(f,g);
end

ezplot(x,[0,1])
hold on
ezplot(f,[0,1])
ezplot(g,[0,1])
legend('x','f','g','Location','bestoutside')
hold off

%plot3=ezplot(g,[0,1]);
%set(plot3,'color','black','LineStyle', '--','LineWidth',2);
