0
|
1 % Numerical Integration Toolbox |
|
2 % |
|
3 % MATLAB Toolbox for 1-D, 2-D, and n-D Numerical Integration |
|
4 % |
|
5 % Edited Version for OCTAVE |
|
6 % |
|
7 % The original 1-D routines were obtained from NETLIB and were |
|
8 % written by |
|
9 % Howard Wilson |
|
10 % Department of Engineering Mechanics |
|
11 % University of Alabama |
|
12 % Box 870278 |
|
13 % Tuscaloosa, Alabama 35487-0278 |
|
14 % Phone 205 348-1617 |
|
15 % Email address: HWILSON @ UA1VM.UA.EDU |
|
16 % |
|
17 % The rest of the routines were written by |
|
18 % Bryce Gardner |
|
19 % Ray W. Herrick Laboratories |
|
20 % Purdue University |
|
21 % West Lafayette, IN 47906 |
|
22 % Phone: 317-494-0231 |
|
23 % Fax: 317-494-0787 |
|
24 % Email: gardner@ecn.purdue.edu |
|
25 % |
|
26 % Easy to use routines: (these routines iteratively integrate with |
|
27 % higher order quadratures until the integral has |
|
28 % converged--use these routine unless you want to |
|
29 % specify the order of integration quadrature that |
|
30 % is to be used) |
|
31 % quadg.m -- High accuracy replacement for QUAD and QUAD8 (1-D) |
|
32 % quad2dg.m -- 2-D integration over a rectangular region |
|
33 % quad2dggen.m -- 2-D integration over a general region |
|
34 % quadndg.m -- n-D integration over a n-D hyper-rectangular region |
|
35 % README.nit -- introductory readme file |
|
36 % |
|
37 % The 1-D routines: |
|
38 % README -- The original readme file by Howard Wilson |
|
39 % gquad.m -- Integrates a 1-D function with input Gauss |
|
40 % points and weights (modified by Bryce Gardner to |
|
41 % handle an optional parameter in the function to be |
|
42 % integrated and also to calculate the Gauss points |
|
43 % and weights on the fly) |
|
44 % gquad6.m -- Integrates a 1-D function with a 6-point quadrature |
|
45 % grule.m -- Calculates the Gauss points and weights |
|
46 % run.log -- File with examples |
|
47 % |
|
48 % New 1-D routines: |
|
49 % quadg.m -- High accuracy replacement for QUAD and QUAD8 |
|
50 % quadc.m -- 1-D Gauss-Chebyshev integration routine |
|
51 % crule.m -- Calculates the Gauss-Chebyshev points and weights |
|
52 % ncrule.m -- Calculates the Newton-Coates points and weights |
|
53 % |
|
54 % The 2-D routines: |
|
55 % quad2dg.m -- 2-D integration over a rectangular region |
|
56 % quad2dc.m -- 2-D integration over a rectangular region with |
|
57 % a 1/sqrt(1-x.^2)/sqrt(1-y.^2) sinqularity |
|
58 % gquad2d.m -- Integrates a 2-D function over a square region |
|
59 % gquad2d6.m -- Integrates a 2-D function over a square region with |
|
60 % a 6-point quadrature |
|
61 % quad2dggen.m -- 2-D integration over a general region |
|
62 % quad2dcgen.m -- 2-D integration over a general region with |
|
63 % a 1/sqrt(1-x.^2)/sqrt(1-y.^2) sinqularity |
|
64 % gquad2dgen.m -- Integrates a 2-D function over a variable region |
|
65 % (That is the limits on the inner integration are |
|
66 % defined by a function of the variable of integration |
|
67 % of the outer integral.) |
|
68 % grule2d.m -- Calculates the Gauss points and weights for gquad2d.m |
|
69 % grule2dgen.m -- Calculates the Gauss points and weights for |
|
70 % gquad2dgen.m |
|
71 % crule2d.m -- Calculates the Gauss-Chebyshev points and weights |
|
72 % for gquad2d.m |
|
73 % crule2dgen.m -- Calculates the Gauss-Chebyshev points and weights |
|
74 % for gquad2dgen.m |
|
75 % |
|
76 % The n-D routines: |
|
77 % quadndg.m -- n-D integration over an n-D hyper-rectangular region |
|
78 % gquadnd.m -- Integrates a n-D function over |
|
79 % an n-D hyper-rectangular |
|
80 % region using a Gauss quadrature |
|
81 % cquadnd.m -- Integrates a n-D function over |
|
82 % an n-D hyper-rectangular |
|
83 % region using a Gauss-Chebyshev quadrature |
|
84 % innerfun.m -- used internally to gquadnd.m and cquadnd.m |
|
85 % |
|
86 % Utility routines: |
|
87 % count.m -- routine to count the number of function calls |
|
88 % zero_count.m -- routine to report the number of function calls and |
|
89 % then to reset the counter |
|
90 % |
|
91 % Test scripts: |
|
92 % run2dtests.m -- 2-D examples and 1-D Gauss-Chebyshev examples |
|
93 % tests2d.log -- output of run2dtests.m -- Matlab 4.1 on a Sparc 10 |
|
94 % test_ncrule.m-- m-file to check the Newton-Coates quadrature |
|
95 % testsnc.log -- output of test_ncrule.m -- Matlab 4.1 on a Sparc 10 |
|
96 % test_quadg.m -- m-file to check the quadg routine |
|
97 % testsqg.log -- output of test_quadg.m -- Matlab 4.1 on a Sparc 10 |
|
98 % |
|
99 % Test functions: |
|
100 % xsquar.m -- xsquar(x)=x.^2 |
|
101 % xcubed.m -- xcubed(x)=x.^3 |
|
102 % x25.m -- x25(x)=x.^25 |
|
103 % fxpow.m -- fxpow(x,y)=x.^y |
|
104 % hx.m -- hx(x)=sum(x.^2) |
|
105 % gxy.m -- gxy(x,y)=x.^2+y.^2 |
|
106 % gxy1.m -- gxy1(x,y)=ones(size(x)) |
|
107 % gxy2.m -- gxy2(x,y)=sqrt(x.^2+y.^2) |
|
108 % glimh.m -- glimh(y)=3 |
|
109 % glimh2.m -- glimh(y)=y |
|
110 % gliml.m -- gliml(y)=0 |
|
111 % lcrcl.m -- lcrcl(y)=-sqrt(4-y.^2) |
|
112 % lcrcu.m -- lcrcu(y)=sqrt(4-y.^2) |
|
113 % |