I have been fitting linear least-squares polynomials to data using the polyfit function in matlab. From what I read, this uses standard polynomial basis (monomial basis). I have read that using Chebyshev polynomial basis to fit leads to greater numerical stability so I would like to do this. Does matlab have this option?
I have been fitting linear least-squares polynomials to data using the polyfit function in
Share
I think you are looking for the Chebfun toolbox. It overloads, amongst others, the polyfit function using Chebychev points and Chebychev interpolants.
Next to the above, you can always code this yourself. It is not that difficult. EDIT: See the post of mathematician1975 :). EDIT2: updated chebfun website.