Note that your loop is entirely superfluous because you do not change anything inside that loop to change the calculation of y. Basically every loop iteration is discarded except for the last one.
You generate the entire x vector and wrote vectorized code to calculate y, which is a better way to solve this than what your assignment asked for (using a loop):
x = linspace(0,20,20);
y = x.^3-(5.*x).^2+2.^x-(10000.*x);
plot(x,y)

