[Top][All Lists]

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

[Help-gsl] Re: Pass additional parameters to numerical integration funct

From: Chris Gast
Subject: [Help-gsl] Re: Pass additional parameters to numerical integration functions
Date: Tue, 2 Mar 2010 22:28:29 -0800

In case anyone was crafting a thoughtful response:  please stop.  I was able
to piece something together from some examples.  Thanks anyway, for those
who may have thought about it.


Chris Gast

On Tue, Mar 2, 2010 at 8:14 PM, Chris Gast <address@hidden> wrote:

> Hello,
> I have a function f(x_i) which I wish to integrate within a summation, for
> each value of the summation index.  That is, I want compute:
> sum(integral(f(x_i)))
> In this particular case, I am trying to use gsl_integration_qagi().  I need
> to be able to pass (at the very least) the index value of the summation, i.
> In a perfect world, I could pass a vector of information that would then be
> used to create f(x_i), and then I could integrate and sum.
> Does such a perfect world exist?  Is anyone aware of how I might pass
> additional arguments through the call to gsl_integration_qagi() to be used
> by the function f()?
> Thanks,
> Chris Gast
> Quantitative Ecology and Resource Management
> University of Washington, Seattle, WA, USA
> address@hidden

reply via email to

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