A high order interpolating polynomial is a REALLY, REALLY, REALLY bad idea. There, if i said it three times, it must be true. Seriously, it is. Just because they taught you about Lagrange interpolating polynomials, does not mean it was ever a good idea. Even Lagrange does not use them anymore. Ok, I will concede that he is dead. But if he were alive, he would be using splines.
Regardless, your question is trivial to solve. Sigh. ;-)
x = -3:3';
y = exp(-x.^2);
P = polyfit(x,y,6)
-0.012754 7.886e-18 0.19267 7.1945e-17 -0.81204 -3.6035e-16 1
vpa(dot(P,X.^(length(P) - 1: - 1:0)),6)
- 0.0127544*X^6 + 7.88603e-18*X^5 + 0.192672*X^4 + 7.1945e-17*X^3 - 0.812038*X^2 - 3.60352e-16*X + 1.0
Is it a good idea to use that polynomial? Absolutely not!
Is that really a good approximation to the underlying function? It is an interpolating polyynomial. But do you seriously want to use it, for ANYTHING?