ⓘ This web page is about the old AlgoSim 2 software. Perhaps you are looking for the new Algosim 3 application?
AlgoSim
Homepage | Screenshots | Gallery of Visualisation | User's Guide | Function Reference | Download | FAQ | Support | Bugs and Solutions | Donate

Reference: polyFit

polyFit(n, X, Y) returns the coefficients ❨a0, a1, a2, ..., an❩ of the polynomial a0 + a1 x + a2 x^2 + ... + an x^n of degree n that, in a least-squares sense, is the best polynomial curve of degree n that approximates the point set {❨X_1, Y_1❩, ❨X_2, Y_2❩, ..., ❨X_k, Y_k❩} where k is the dimension of both real vectors X and Y.