rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
intervalquadrature.m
Go to the documentation of this file.
1 function res = intervalquadrature(poldeg,func,varargin)
2 %function res = intervalquadrature(poldeg,func,varargin)
3 % integration of function func over reference interval == unit interval.
4 % by Gaussian quadrature exactly integrating polynoms of poldeg.
5 %
6 % arguments:
7 % poldeg: degree of polynomial the quadrature rule exactly approximates
8 % (0-23)
9 % func: is a function getting a local coordinate vector (1d) and giving a
10 % (vectorial or scalar) result
11 % varargin: optional further arguments for function
12 %
13 % return values:
14 % res: result of quadrature
15 %
16 
17 % Bernard Haasdonk 27.8.2009
18 
19 [ points, weights ] = get_quadrature_weights_1d(poldeg);
20 
21 res = quadrature(weights,points,func,varargin{:});
22 
23 return
24