polynomialFit¶
Least-squares quartic c[1] + c[2]x + ... + c[5]x^4 through 10 points (x, y)
FastSmoothBuildings.Utilities.polynomialFit, function (source)
Purpose
Least-squares fit of a quartic c1 + c2 x + … + c5 x4 through 10 points (xk, yk).
Equations
The normal equations A c = b, with Aij = ∑k xki+j−2 and bi = ∑k yk xki−1, solved by Gaussian elimination without pivoting (the normal matrix is symmetric positive definite when at least five of the xk differ) and back substitution.
Use
Called on parameters: the windows fit the solar transmittance and the absorptance of each pane, given at the incidence angles 0, 10, …, 90 degrees, as quartics in the cosine of the angle, and evaluate them with polynomial.
Revisions¶
- October 2026: moved from trano's
FastModel.Utilities.