gaussleg.m
The function calculates Gauss-Legendre points and weights in [a,b] interval with accuracy order n. Of all existing numerical integration methods, Gauss-Legendre quadrature is one of the most efficient and accurate.
Syntax
[x,w]=gaussleg(a,b,n)
Parameters
a - left edge of the interval
b - right edge of the interval
n - accuracy order, the number of points in the
resulting grid will be n+1.
Outputs
x - Gauss-Legendre points w - Gauss-Legendre weights
Notes
Gauss-Legendre quadratures of order exceeding 50 are numerically unstable, subdivide your interval instead of increasing the accuracy order.
See also
arclength.m, get_hull.m, grid_fibon.m, grid_igloo.m, grid_kron.m, grid_plot.m, grid_polar.m, grid_test.m, grid_trian.m, one_vcell_solidangle.m, repulsion.m, shrewd.m, sphtarea.m, sphtrsubd.m, vcell_solidangle.m, voitlander.m, voronoisphere.m, zfs_sampling.m, Kernel_utilities, Appendix I: powder grids
Version 2.6, authors: Ilya Kuprov