[UP]


Manual Reference Pages  - splift (3)

NAME

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

CONTENTS

Synopsis
Description
Options
Returns
Example
Pedigree

SYNOPSIS

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

DESCRIPTION

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.

OPTIONS

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.

RETURNS

YP Resulting derivative
YPP Resulting second derivative
IERR Error status.

    NORMAL CODES

=0 means the requested spline was computed.

    ABNORMAL CODES

=1 means N was too small (.LT.4).
=2 means the abscissas were not strictly increasing.

EXAMPLE

PEDIGREE

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 1973

WARD implementation S. J. Orbon 4/1/1974

F90+ Implementation J. S. Urban


splift (3) March 11, 2021
Generated by manServer 1.08 from f7afd3d8-1241-4e31-84fa-6dd0f3564928 using man macros.