I've seen two different conventions for representing polynomials as vectors of coefficients. The one used by functions like polyfit and polyval has the high order term as the first element.
p = [1 2 3];
x = 4;
v1 = polyval(p, x)
The other has the high order term as the last element.
v2 = p(1)+x*p(2)+x.^2*p(3)
Based on the fact that the sample polynomial used in the grading of your assignment has 0 as its first element, I'm wondering if they're using the latter convention.
Alternately, does your assignment say your function should return a function handle or the numeric result of evaluating that polynomial?