octave-maintainers
[Top][All Lists]
Advanced

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

Re: implementing integral, integral2, integral3 functions


From: Rik
Subject: Re: implementing integral, integral2, integral3 functions
Date: Wed, 06 Aug 2014 09:40:46 -0700

On 08/06/2014 09:00 AM, address@hidden wrote:
C.,

While I agree that the integral functions are very similar to pre-existing octave functions, they do have some functionality which other functions do not (at least as far as I know; do correct me if I am wrong). 

For instance, the integral function supports an "ArrayValued" option, which quadgk does not (though this probably wouldn't be terribly hard to implement). Further, integral2 and integral3 support both a 'tiled' integration method as well as an 'iterated' integration method. dblquad only implements an iterated method (but again, if this tiled functionality exists elsewhere in octave, please tell me). Implementing a tiled method would probably be harder, which is why I was thinking of using the cubature code that I found. I could alternatively attempt to implement it myself in octave code as opposed to C code.

I will also say that dblquad only allows for rectangular integration limits, while integral2 allows for limits of the form c(x) < y < d(x), for arbitrary functions c and d (and the trplquad vs integral3 situation is analogous), but that should be trivial to implement.

In general it will be easier to write and debug code written in Octave's m-file language.  The universal suggestion is to start in Octave, and only go outside to other languages if driven that way by something which can't be accomplished in m-files.  I would start by getting a copy of the development source code from Mercurial and making sure you can build Octave from scratch.  You might start at this page: http://www.gnu.org/software/octave/get-involved.html.

--Rik


reply via email to

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