% plot cubic function for various values of c
a=0.2;
u=[-0.1:0.01:1.1];
for c=-0.15:0.01:0.15
    f=-u.*(u-a).*(u-1)+c;
    clf;
    plot(u,f);
    hold on;
    axis([-0.1,1.1,-0.05,0.15]);
    xlabel('u','fontsize',14);
    ylabel('f(u)','fontsize',14);
    plot([-0.1,1.1],[0,0],'k:');
    str1=sprintf('fcubic2: a= %6.4g, c= %6.3g',a,c);
    title(str1);    
    pause(1);
end;
