You'll want to use the gsl_multifit_linear or gsl_multifit_robust
routines in Least Squares -> multi parameter fitting part of the manual.
You need to build the least squares matrix manually and then pass it to
those routines.
On 01/09/2014 10:15 AM, Matthias Sitte wrote:
Hi,
I'm looking for a way to to a least-square-fit to a data set (x,y,z).
The fit function should be a polynomal like the following:
z(x,y) = \sum_{m,n=0,m+n<=N}^{N} c_{mn} x^m y^n
= c_{00} + c_{10} x + c_{01} y
+ c_{20} x^2 + c_{11} xy + c_{02} y^2 + ...
I've been using GSL a lot and know my way around, but I don't know the
terminology of least-square-fits, so I'm kindly asking you to name the
proper function(s) I should use before I lose myself in the docs ;-)
Thx,
Matthias