setupq Subroutine

subroutine setupq(x, dx, y, npoint, v, qty)

************80

! SETUPQ is to be called in SMOOTH.

Discussion:

Put DELX = X(*+1) - X(*) into V(*,4).

Put the three bands of Q' * D into V(*,1:3).

Put the three bands of ( D * Q )' * ( D * Q ) at and above the diagonal
into V(*,5:7).

Here, Q is the tridiagonal matrix of order ( NPOINT-2, NPOINT )
with general row

  1/DELX(I), -1/DELX(I)-1/DELX(I+1), 1/DELX(I+1)

and D is the diagonal matrix with general row DX(I).

Modified:

14 February 2007

Author:

Carl DeBoor

Reference:

Carl DeBoor,
A Practical Guide to Splines,
Springer, 2001,
ISBN: 0387953663,
LC: QA1.A647.v27.

Parameters:

Input, real ( kind = 8 ) X(NPOINT), the abscissas, assumed to be 
strictly increasing.

Input, real ( kind = 8 ) DX(NPOINT), the data uncertainty estimates,
which are assumed to be positive.

Input, real ( kind = 8 ) Y(NPOINT), the corresponding ordinates.

Input, integer ( kind = 4 ) NPOINT, the number of data points.

Output, real ( kind = 8 ) V(NPOINT,7), contains data needed for
the smoothing computation.

Output, real ( kind = 8 ) QTY(NPOINT), the value of Q' * Y.

Arguments

Type IntentOptional Attributes Name
real(kind=8) :: x(npoint)
real(kind=8) :: dx(npoint)
real(kind=8) :: y(npoint)
integer(kind=4) :: npoint
real(kind=8) :: v(npoint,7)
real(kind=8) :: qty(npoint)