Legendre-Gauss-Radau quadrature is used to numerically integrate a function over a finite interval from -1 to 1. It involves calculating the Legendre-Gauss-Radau points and weights based on the specified number of nodes. In Matlab, we can use the lgwt
function to calculate the Legendre-Gauss-Radau points and weights.
main.m432 chars23 lines
We can call this function and provide the necessary inputs to compute the Legendre-Gauss-Radau points and weights. For example, to compute the LG-R points and weights with 3 nodes over the interval [-1,1], we can run the following:
main.m97 chars14 lines
This will return the 3 Legendre-Gauss-Radau points and the corresponding weights.
gistlibby LogSnag