coefs=
legendrepoly (order,x)
¶Compute the coefficients of the Legendre polynomial, given the order. We calculate the Legendre polynomial using the recurrence relations, Pn+1(x) = inv(n+1)*((2n+1)*x*Pn(x) - nPn-1(x)).
If the value x is specified, the polynomial is also evaluated, otherwise just the return the coefficients of the polynomial are returned.
This is NOT the generalized Legendre polynomial.
Package: miscellaneous