Polynomial curve fitting (improved)

Versione 1.0.0 (1,67 KB) da Xiaoluo Yu
returns a polynomial p(x) with the coefficients z of degree m that is a best fit for the data in y without ill-conditioned errors.
83 download
Aggiornato 8 giu 2020

Visualizza la licenza

[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
Creato con R2020a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0