On 10/6/05, James Fitzsimons <[EMAIL PROTECTED]> wrote:

> How would I construct a gsl_multifit_function_fdf for this?

I'm not sure I fully understand the core of your question.  If it's
about the GSL API, have you looked at the example in the manual
(http://www.gnu.org/software/gsl/manual/gsl-ref_37.html#SEC492)? In
essence, you'll have to separate the parameters of your function into
those you wish to adjust and those you don't. Gather all the latter
ones into a struct, and pass a pointer to that struct around as the
value of the params argument. Next, the adjustable parameters have to
be treated as components of a gsl_vector. Then, in the simplest case,
you would write two C functions: one which evaluates the function at a
given point, and one which computes the partial derivatives at a given
point.  Initially you can write a naive fdf function which simply
calls the f() and df() functions. Then allocate a
gsl_multifit_function_fdf structure (automatic or static allocation
often works), initialize it with the function pointers and other data,
and you're good to go. If you have specific questions about your
function, you'd probably have to post some more details about that
function. What may be confusing is that it's possible to
simultaneously fit several functions with common adjustable
parameters.
-- mj


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to