%
% Plotting a cubic
%

x = linspace(-2, 2, 101);
y = x.^3 - 2*x + 1;
plot(x, y);
axis('equal');
title('Cubic');
grid on
