splift(3f) - [M_math:fit] fits a spline to the n data points given in x and y and also returns first and second derivatives
Synopsis
Description
Options
Returns
Example
Pedigree
subroutine splift(x,y,yp,ypp,n,ierr,a1,b1,an,bn)
real,intent(in) :: x(n),y(n) real,intent(out) :: yp(n),ypp(n) integer,intent(in) :: n integer,intent(out) :: ierr real,intent(in) :: a1 real,intent(in) :: b1 real,intent(in) :: an real,intent(in) :: bn
SPLIFT(3f) fits a spline to the N data points given in X and Y and returns the first and second derivatives in YP and YPP. The resulting spline, defined by the arrays X, Y, and YPP, may then be interpolated (if desired) using SPLINT(3f).For a smoothing spline fit see SUBROUTINE SMOOTH.
X array of abscissas (in increasing order) Y array of ordinates N number of data points (the dimension of X,Y,YP and YPP) A1,B1,AN,BN end condition specifications The end conditions of the spline are YPP(1) = A1*YPP(2) + B1 and YPP(N) = AN*YPP(N-1) + BN, where ABS(A1).LT.1.0 and ABS(AN).LT.1.0.The smoothest (i.e., least integral of square of second derivative) spline is obtained by A1=B1=AN=BN=0. If extrapolation outside the range from X(1) to X(N) is to be done (By SPLINT(3f), say), better results may be obtained by using A1=AN=0.5, B1=BN=0.
YP Resulting derivative YPP Resulting second derivative IERR Error status.
=0 means the requested spline was computed.
=1 means N was too small (.LT.4). =2 means the abscissas were not strictly increasing.
Original written by:
Rondall E. Jones Sandia Mathematical Program Library Applied Mathematics Division 2642 Sandia Laboratories P. O. Box 5800 Albuquerque, New Mexico 87115 Control Data 6600 Version 5.1, 10 December 1973WARD implementation S. J. Orbon 4/1/1974
F90+ Implementation J. S. Urban
Nemo Release 3.1 | splift (3) | February 23, 2025 |