Exercise "Least-squares fit"

  1. Make a subroutine that fits a given data-set [xi, yi, σi], i=1..n, with a linear combination of given functions [fk(x)], k=1..m. The subroutine must return the vector of coefficients and the covariance matrix.
  2. Make some interesting fits, e.g. investigate how reasonable the errors on the fitting coefficients are.