help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Numerical quadrature performed on a set of points


From: Andrew W. Steiner
Subject: Re: [Help-gsl] Numerical quadrature performed on a set of points
Date: Sat, 12 Jul 2008 11:41:55 -0400

One option is to use the gsl_interp or gsl_spline functions to
generate an interpolated version of your function and then use
gsl_interp_eval_integ
or gsl_spline_eval_integ.

Be careful though, as for example using cubic splines for an
exponential function can be bad.
If you know something about the underlying functional form which your
points suggest, then it may be better
to fit the function first, and then integrate.

Take care
Andrew

On Sat, Jul 12, 2008 at 8:56 AM, Hongzheng Wang <address@hidden> wrote:
> Hi,
>
> According to the manual of gsl, there are plenty of subroutines for
> numerical quadrature provided by gsl.  But it seems that they are
> performed on gsl_function objects which can generate necessary values
> required by the undergone algorithm.  My question is, if the function
> is known only on a set of points, how can the integration be
> calculated conveniently?
>
> Thanks.
>
> --
> HZ
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>

- Andrew Steiner (c.f. O2scl at http://o2scl.sourceforge.net)




reply via email to

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