LegPoly: Calculate Legendre Polynomial

View source: R/TSsphere.R

LegPolyR Documentation

Calculate Legendre Polynomial

Description

Function to calculate the Legendre Polynomial, based on the recurrence relation in Numerical Recipes in C (Eq. 4.6.10) with j = j-1 Therefore: P_j = (2j-1) * P_(j-1) - (j-1) * P_(j-2) P_0 = 1; P_1 = x

Usage

LegPoly(degree, coeffs)

Arguments

degree

The degree of the desired polynomial

coeffs

the values at which the p[olynomial will be evaluated

Value

Legendre polynomials

Examples

coeffs=2;degree=3
LegPoly(degree,coeffs)

AustralianAntarcticDivision/ZooScatR documentation built on Aug. 13, 2022, 1:21 a.m.