0
|
1 function nvol = gquadnd (fun,lowerlim,upperlim,nquad) |
|
2 % |
|
3 %usage: nvol = gquadnd (fun,lowerlim,upperlim,nquad); |
|
4 % n -- number of dimensions to integrate |
|
5 % nvol -- value of the n-dimensional integral |
|
6 % fun -- fun(x) (function to be integrated) in this case treat |
|
7 % all the different values of x as different variables |
|
8 % as opposed to different instances of the same variable |
|
9 % x -- n length vector of coordinates |
|
10 % lowerlim-- n length vector of lower limits of integration |
|
11 % upperlim-- n length vector of upper limits of integration |
|
12 % nquad -- n length vector of number of gauss points |
|
13 % in each integration |
|
14 |
|
15 n=length(lowerlim); |
|
16 level=n; |
|
17 x=zeros(n,1); |
|
18 |
|
19 nvol = innerfun(fun,lowerlim,upperlim,nquad,n,level,x,'grule'); |
|
20 |
|
21 endfunction |