Polynomial curve fitting (improved)
[p, z] = polyfit_mod(x,y,m) returns a polynomial p(x) with the coefficients z of degree m that is a best fit (in a least-squares sense) for the data in y.
The coefficients in z are in ascending powers, and the length of z is m+1.
It can be seen as an improvement of MATLAB function "polyfit", to avoid ill-conditioned errors caused by Gram matrix constructed by using natural basis.
Using orthogonal polynomial basis to construct Gram matrix and weight function is 1.
m: polynomial order
p: polynomial obtained by fitting
z: coefficients corresponding to each term of the polynomial
Cita come
Xiaoluo Yu (2025). Polynomial curve fitting (improved) (https://it.mathworks.com/matlabcentral/fileexchange/76724-polynomial-curve-fitting-improved), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxTag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0 |
