/* * Library: lmfit (Levenberg-Marquardt least squares fitting) * * File: demo/curve1.c * * Contents: Example for curve fitting with lmcurve(): * fit a data set y(x) by a curve f(x;p). * * Note: Any modification of this example should be copied to * the manual page source lmcurve.pod and to the wiki. * * Author: Joachim Wuttke 2004-2013 * * Licence: see ../COPYING (FreeBSD) * * Homepage: apps.jcns.fz-juelich.de/lmfit */ #include "lmcurve.h" #include #include void lm_qrfac(int m, int n, double *a, int *ipvt, double *rdiag, double *acnorm, double *wa); void set_orthogonal( int n, double *Q, double* v ) { int i, j; double temp = 0; for (i=0; i