%% cubic_plot plots the cubic function.
%
a = -1.0;
b = 2.0;
x = linspace ( a, b, 101 );
y = cubic ( x);

clf ( );
hold ( 'on' );
plot ( x, y, 'linewidth', 3 );
plot ( [a,b], [0,0], 'k-', 'linewidth', 3 );
hold ( 'off' );

grid ( 'on' );
xlabel ( '<-- x -->' );
ylabel ( '<-- cubic(x) -->' );
title ( 'A cubic function' );

print ( '-dpng', 'cubic.png' );
