Mercurial > forge
view extra/integration/gquadnd.m @ 0:6b33357c7561 octave-forge
Initial revision
author | pkienzle |
---|---|
date | Wed, 10 Oct 2001 19:54:49 +0000 |
parents | |
children |
line wrap: on
line source
function nvol = gquadnd (fun,lowerlim,upperlim,nquad) % %usage: nvol = gquadnd (fun,lowerlim,upperlim,nquad); % n -- number of dimensions to integrate % nvol -- value of the n-dimensional integral % fun -- fun(x) (function to be integrated) in this case treat % all the different values of x as different variables % as opposed to different instances of the same variable % x -- n length vector of coordinates % lowerlim-- n length vector of lower limits of integration % upperlim-- n length vector of upper limits of integration % nquad -- n length vector of number of gauss points % in each integration n=length(lowerlim); level=n; x=zeros(n,1); nvol = innerfun(fun,lowerlim,upperlim,nquad,n,level,x,'grule'); endfunction