Polynomial curve fitting - MATLAB polyfit
www.mathworks.com › help › matlabplot (year,pop, 'o') Use polyfit with three outputs to fit a 5th-degree polynomial using centering and scaling, which improves the numerical properties of the problem. polyfit centers the data in year at 0 and scales it to have a standard deviation of 1, which avoids an ill-conditioned Vandermonde matrix in the fit calculation.