e02bcf
e02bcf
© Numerical Algorithms Group, 2002.
Purpose
E02BCF Evaluation of fitted cubic spline, function and derivatives
Synopsis
[s,ifail] = e02bcf(lamda,c,x<,left,ifail>)
Description
This routine evaluates the cubic spline s(x) and its first three
derivatives at a prescribed argument x. It is assumed that s(x)
is represented in terms of its B-spline coefficients c , for
i
_
i=1,2,...,n+3 and (augmented) ordered knot set (lambda) , for
i
_
i=1,2,...,n+7, (see E02BAF), i.e.,
q
--
s(x)= > c N (x)
-- i i
i=1
_ _
Here q=n+3, n is the number of intervals of the spline and N (x)
i
denotes the normalised B-spline of degree 3 (order 4) defined
upon the knots (lambda) ,(lambda) ,...,(lambda) . The
i i+1 i+4
prescribed argument x must satisfy
(lambda) <=x<=(lambda)_
4 n+4
At a simple knot (lambda) (i.e., one satisfying
i
(lambda) <(lambda) <(lambda) ), the third derivative of the
i-1 i i+1
spline is in general discontinuous. At a multiple knot (i.e., two
or more knots with the same value), lower derivatives, and even
the spline itself, may be discontinuous. Specifically, at a point
x=u where (exactly) r knots coincide (such a point is termed a
knot of multiplicity r), the values of the derivatives of order
4-j, for j=1,2,...,r, are in general discontinuous. (Here
1<=r<=4;r>4 is not meaningful.) The user must specify whether the
value at such a point is required to be the left- or right-hand
derivative.
E02BCF can be used to compute the values and derivatives of cubic
spline fits and interpolants produced by E02BAF.
If only values and not derivatives are required, E02BBF may be
used instead of E02BCF, which takes about 50% longer than E02BBF.
Parameters
e02bcf
Required Input Arguments:
lamda (:) real
c (:) real
x real
Optional Input Arguments: <Default>
left integer 0
ifail integer -1
Output Arguments:
s (4) real
ifail integer