Previous: fitbz3 Up: ../plot79_f.html Next: fitc2
SUBROUTINE FITC1 (N, X, Y, SLP1, SLPN, YP, TEMP, SIGMA)
C$ (Tensioned Spline Fit)
C$ This subroutine determines the parameters necessary to
C$ compute an interpolatory spline under tension through a
C$ sequence of functional values. The slopes at the two ends
C$ of the curve may be specified or omitted. For actual
C$ computation of points on the curve, it is necessary to call
C$ the function FITC2.
C$
C$ On input--
C$
C$ N........is the number of values to be interpolated
C$ (N.GE.2).
C$ X........is an array of the N increasing abscissae of the
C$ functional values.
C$ Y........is an array of the N ordinates of the values,
C$ (i.e. Y(K) is the functional value corresponding
C$ to X(K)).
C$ SLP1 and SLPN......contain the desired values for the first
C$ derivative of the curve at X(1) and X(N),
C$ respectively. If the quantity SIGMA is negative,
C$ these values will be determined internally and the
C$ user need only furnish place-holding parameters
C$ for SLP1 and SLPN. Such place-holding parameters
C$ will be ignored but not destroyed.
C$ YP.......is an array of length at least N
C$ TEMP.....is an array of length at least N which is used for
C$ scratch storage.
C$ SIGMA....contains the tension factor. This is non-zero and
C$ indicates the curviness desired. If ABS(SIGMA) is
C$ nearly zero (e.g. 0.001), the resulting curve is
C$ approximately a cubic spline. If ABS(SIGMA) is
C$ large (e.g. 50.0), the resulting curve is nearly a
C$ polygonal line. The sign of SIGMA indicates
C$ whether the derivative information has been input
C$ or not. If SIGMA is negative, the endpoint
C$ derivatives will be determined internally. A
C$ standard value for SIGMA is approximately 1.0 in
C$ absolute value.
C$
C$ On output--
C$
C$ YP......contains values proportional to the second
C$ derivative of the curve at the given nodes.
C$ N,X,Y,SLP1,SLPN and SIGMA.....are unaltered.
C$
C$ Author: A.K. Cline, "Scalar and Planar Valued Curve
C$ Fitting Using Splines Under Tension", Comm. A.C.M.
C$ 17, 218-225 (1974). (Algorithm 476).
C$
C$
C$ Modifications by Nelson H.F. Beebe, Department of Chemistry
C$ Aarhus University, Aarhus, Denmark, to provide a more
C$ transportable program, and to compute SINH(X) more
C$ accurately than 0.5*(EXP(X)-EXP(-X)) for small arguments.
C$ (20-JUL-89)