Given $N$ data points, does polyfit
of degree $N-1$ produces the unique interpolating polynomial?
For concreteness, here is a code example:
x=[1:10]
y= x.^3;
pp = polyfit(x,y,9)
where the following warning is issued:
Warning: Polynomial is badly conditioned. Add points with
distinct X values, reduce the degree of the polynomial, or try
centering and scaling as described in HELP POLYFIT.
> In polyfit (line 79)
pp is indeed $x^3$, as it should be, but why is this ill-conditioned? Interpolation is only ill-conditioned with respect to some bases (say, the monomials $1,x,x^2,\ldots$), but not with respect to others?