[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Nonlinear fitting with finite Difference Jacobian

From: Patrick Alken
Subject: Re: [Help-gsl] Nonlinear fitting with finite Difference Jacobian
Date: Tue, 10 Sep 2013 09:00:39 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130806 Thunderbird/17.0.8

Hi, in the nonlinear least squares example, all you need to do is replace the lines:

  f.df = &expb_df;
  f.fdf = &expb_fdf;


  f.df = NULL;
  f.fdf = NULL;

and the solver will switch to the finite difference Jacobian method. I will add some comments to the example program for this.


On 09/10/2013 02:15 AM, Kazimierz Skrobas wrote:
In gsl help is written (section 38.4):

For the algorithms which require a Jacobian matrix of derivatives of the
fit functions, there
are times when an analytic Jacobian may be unavailable or too expensive to

Therefore GSL supports approximating the Jacobian numerically using finite
differences of
the fit functions.


Does somebody implemented above method of nonlinear fitting ?

Short information in gsl help says: "This is typically done by setting the
relevant function pointers of the gsl_multifit_function_fdf data type to
NULL"  but code based on these method doesn't work. Program finishes with
segmantation fault.

If somebody knows the answer and can put example code
I will be grateful



reply via email to

[Prev in Thread] Current Thread [Next in Thread]