Previous: fitcf Up: ../plot79_f.html Next: fitd2
REAL FUNCTION FITCS (T, N, X, A, B, C, D, IT)
C$ (Evaluate a Cubic Spline at a Point)
C$ This function interpolates a curve at a given point using a
C$ cubic spline. SUBROUTINE FITSM should be called earlier to
C$ determine certain necessary parameters.
C$
C$ On input--
C$
C$ T...........ordinate value for which the cubic spline
C$ interpolant is to be evaluated.
C$ N...........number of points in X(*).
C$ X(*)........original ordinate values used to determine
C$ the spline.
C$ A(*),B(*),C(*),D(*).....spline polynomial coefficients.
C$ IT.......... .EQ. 1 - first call.
C$ .NE. 1 - subsequent call (with N, X, A, B, C,
C$ D unchanged), and this value of T
C$ larger than the previous value. In
C$ such a case, the search for the
C$ interval in which T lies can be
C$ greatly speeded. Thus IT can
C$ frequently be a loop index in the
C$ calling program if the values of T
C$ are incremented successively.
C$
C$ The parameters N, X, A, B, C, and D should be input
C$ unaltered from the output of SUBROUTINE FITSM.
C$
C$ On output--
C$
C$ FITCS contains the interpolated value. For T less than
C$ X(1), FITCS = Y(1). For T greater than X(N), FITCS = Y(N).
C$ None of the input parameters are altered. Adapted from FUNCTION
C$ FITC2 by
C$
C$ Author: A.K. Cline, "Scalar and Planar Valued Curve Fitting
C$ Using Splines Under Tension", Comm. A.C.M. 17,
C$ 218-225 (1974). (Algorithm 476).
C$
C$ Modifications by Nelson H.F. Beebe, Department of Chemistry
C$ Aarhus University, Aarhus, Denmark, to provide a more
C$ transportable program.
C$ (03-APR-82)