Previous: fitd2 Up: ../plot79_f.html Next: fitds
SUBROUTINE FITDIN (IENT, H, N, TNODE, G, END1, ENDN, B, C, D)
C$ (ALG547 - Discrete Interpolating Cubic Spline)
C$ This subroutine computes the discrete cubic spline defined
C$ on the interval (TNODE(1),TNODE(N)), which interpolates the
C$ data (TNODE(I),G(I)),I=1,2,...,N. We require that TNODE(I)
C$ .LT. TNODE(I+1). END1 and ENDN contain the values of the
C$ end conditions being used.
C$
C$ If IENT = 1, the first central divided difference end
C$ conditions are being used.
C$
C$ If IENT = 2, the second central divided difference end
C$ conditions are being used.
C$
C$ IF IENT = 3, the periodic end conditions are being used.
C$ For this case the contents of G(N), END1, and ENDN are
C$ ignored.
C$
C$ For all three end conditions N must be greater than or
C$ equal to 2.
C$
C$ The discrete cubic spline is represented by piecewise cubic
C$ polynomials. For T in the internal (TNODE(I),TNODE(I+1))
C$ the cubic spline is
C$
C$ S(T)=G(I)+B(I)*(T-TNODE(I))
C$ +C(I)*(T-TNODE(I))**2
C$ +D(I)*(T-TNODE(I))**3
C$
C$
C$ Input parameters (none of these parameters are changed by
C$ this subroutine.)
C$
C$ IENT......specifies end conditions which are in effect.
C$ H.........the step size used for the discrete cubic spline.
C$ N.........number of nodes (TNODE) and data values (G).
C$ (N.GE.2)
C$ TNODE(*)..REAL array containing the nodes (TNODE(I) .LT.
C$ TNODE(I+1)).
C$ G(*)......REAL array containing the interpolating data.
C$ END1......end condition value at TNODE(1).
C$ ENDN......end condition value at TNODE(N).
C$
C$ Output parameters
C$
C$ B.........REAL array containing coefficients of
C$ (T-TNODE(I)),I=1,2,....,N-1.
C$ C.........REAL array containing coefficients of
C$ (T-TNODE(I))**2,I=1,2,...,N-1.
C$ D.........REAL array containing coefficients of
C$ (T-TNODE(I))**3,I=1,2,...,N-1.
C$
C$ This routine has been developed and described by
C$
C$ Charles S. Duris, "Discrete Interpolation and Smoothing
C$ Spline Functions", SIAM J. Numer. Anal. 14, 686-698 (1977).
C$
C$ Charles S. Duris, "Algorithm 547 - FORTRAN routines for
C$ Discrete Cubic Spline Interpolation and Smoothing
C$ (E1),(E3)", ACM Trans. Math. Software 6, NO. 1, 92-103
C$ (March 1980).
C$
C$ (03-APR-82)