<< legendre_poly Legendre legendre_variance >>

Orthogonal Polynomials >> Orthogonal Polynomials > Legendre > legendre_quadrature

legendre_quadrature

Returns nodes and weights of Gauss-Legendre quadrature

Calling Sequence

[x,w]=legendre_quadrature(n)

Parameters

n :

a 1-by-1 matrix of doubles, integer value, n>=0, the number of nodes.

x :

a n-by-1 matrix of doubles, the nodes

w :

a n-by-1 matrix of doubles, the weights

Description

Returns nodes x and weights w of Gauss-Legendre quadrature.

This implementation uses the eigenvalues of the Jacobi matrix.

Examples

[x,w]=legendre_quadrature(6)

Authors

Bibliography

D.P.Laurie, Computation of Gauss-type quadrature formulas, J.Comput. and Applied Maths., 127 (2001)

Numerical Mathematics, Series: Texts in Applied Mathematics, Vol. 37, Alfio Quarteroni, Riccardo Sacco, Fausto Saleri, 2nd ed. 2007


Report an issue
<< legendre_poly Legendre legendre_variance >>