[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Nonlinear fitting
From: |
jeremy theler |
Subject: |
Re: [Help-gsl] Nonlinear fitting |
Date: |
Thu, 03 Jul 2014 20:59:55 -0300 |
User-agent: |
KMail/4.12.4 (Linux/3.2.0-4-amd64; KDE/4.13.1; x86_64; ; ) |
Ken,
If you just need a quick answer to your problem, I would like you to try my
tool called wasora, which amongst other things, is a high-level interface to
some of the GSL tools.
I have added your fitting problem to the examples subdirectory (I made up the
data). You can take a look at it by first downloading the tarball from
http://www.talador.com.ar/jeremy/wasora/
and the looking at examples/fit.was
Sadly, the code is lacking good documentation. So far all I have are examples
of usage. In the following link
http://www.talador.com.ar/jeremy/wasora/realbook/._realbook015.html
some comparison between GSL examples written in C as taken from the manual and
the (almost) the same results obtained with wasora by using a far more simple
high-level input file.
Regarding your fitting problem, wasora takes care of numerically computing the
gradient of the function with respect to the parameters if explicit algebraic
expressions are not given.
--
jeremy
On Thursday 03 July 2014 18:07:40 address@hidden wrote:
> Hi,
> I am trying to fit the nonlinear equation:
> P = C0 + C1*X + C2*X^r
> where C0, C1, C2 and r are variables to be fitted, P and X are vectors
> of known observations.
> I have read the docs and I'm trying to modify the example program. I'm
> struggling to provide the expb_f, expb_df, expb_fdf functions.
> I would like advice on how to proceed.
> Regards,
> Ken