| ![[AIT logo]](/aitlogo_x.gif) | Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, GermanyNew Address! -- Neue Adresse! | ![[Uni logo]](/unilogo_small.gif) | 
       POLYLEG
       Evaluate a Legendre polynomial with specified coefficients.
       Meant to be used analogously to the POLY function in the IDL User's
       Library distribution.
       Result = POLYLEG( X, C )
       X - input variable, scalar or vector
       C - vector of Legendre polynomial coefficients.
       POLYLEG returns a result equal to:
               C[0] + C[1]*P_1(x) + C[2]*P_2(x) + ...
       where P_j(x) is the jth Legendre polynomial.   The output will have
       the same dimensions as the input X variable.
       If x = [0.5, 1.0] and C = [2.4, 1.3, 2.5] then
       print, polyleg(x, c)    ====> [2.7375, 6.20]
       The result can be checked using the first 3 Legendre polynomial terms
       C[0] + C[1]*x + C[2]*(0.5*(3*x^2-1))
       Uses the recurrence relation of Legendre polynomials
               (n+1)*P_n+1(x) = (2n+1)*x*P_n(x) - n*P_n-1(x)
       evaluated with the Clenshaw recurrence formula, see Numerical Recipes
       by Press et al. (1992), Section 5.5
       Written W. Landsman   Hughes STX Co.        April, 1995
       Fixed for double precision  W. Landsman     May, 1997
       Converted to IDL V5.0   W. Landsman   September 1997
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]