I am wanting to do a very simple plot of a polynomial using the plot(x,y)
function. Here is my full code
a = linspace(-3, 0.1, 3);
plot(a, a.^3 - 3*a - 2);
ax = gca;
c = ax.Color;
grid on;
Which outputs the following picture
Why doesn't the graph extend from -3 to 3 on the x-axis? Why does it stop just after $0$?