Learn R Programming

RandomCoefficients (version 0.0.2)

legendrequad: Auxiliary function that compute the Legendre quadrature of order K

Description

Generate nodes and weights for Legendre-Gauss quadrature on [-1,1]. Note that t is a column vector and w is a row vector. Also normalizes and returns the eigenvectors of J so that they are samples of the unit-norm Legendre polynomials

Usage

legendrequad(K)

Arguments

K

order of the Legendre quadraure

Value

a list containing, in order:

- t : points of the Legendre quadrature

- w : weigths for the Legendre quadrature

- Pbarmat : the eigenvectors of J

Examples

Run this code
# NOT RUN {
K=30
res2 <-  legendrequad(K)


# }

Run the code above in your browser using DataLab