[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


POLINT Source code in polint.pro

POLINT

Name
     POLINT
Purpose
     Interpolate a set of N points by fitting a polynomial of degree N-1
Explanation
     Adapted from algorithm in Numerical Recipes, Press et al. (1992),
     Section 3.1.
Calling Sequence
     POLINT, xa, ya, x, y, [ dy ]
Input Parameters
     XA - X Numeric vector, all values must be distinct.   The number of
          values in XA should rarely exceed 10 (i.e. a 9th order polynomial)
     YA - Y Numeric vector, same number of elements
     X - Numeric scalar specifying value to be interpolated
Output Parameters
     Y - Scalar, interpolated value in (XA,YA) corresponding to X
Optional Output
     DY - Error estimate on Y, scalar
Example
     Find sin(2.5) by polynomial interpolation on sin(indgen(10))
               IDL> xa = indgen(10)
               IDL> ya = sin( xa )
               IDL> polint, xa, ya, 2.5, y ,dy
     The above method gives  y = .5988 & dy = 3.1e-4  a close
     approximation to the actual sin(2.5) = .5985
Procedure
     Uses Neville's algorithm to iteratively build up the correct
     polynomial, with each iteration containing one higher order.
Revision History
     Written W. Landsman                 January, 1992
     Converted to IDL V5.0   W. Landsman   September 1997

Last modified by pro2html on 2001 April 26 at 03:13 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically