The CUBSPL function returns the interpolated value of SPLINE/id at X=x and Z=z or returns the iord derivative at the interpolated value of SPLINE/id at X=x, Z=0.
Format
CUBSPL (x, z, id)
or
CUBSPL (x, 0, id [,iord])
Arguments
x | A real variable that specifies the independent variable value along the x-axis of the CUBSPL. |
z | A real variable that specifies the second independent variable value along the z-axis of the surface being interpolated. If the SPLINE statement defines only one curve, Adams Solver (FORTRAN) ignores this variable. |
id | An integer variable that specifies the identifier of a CUBSPL statement. |
iord | An optional integer that specifies the order of the derivative at the interpolate value to be returned by CUBSPL. Range: 0 < iord < 2 |
Extended Definition
The CUBSPL function uses the standard cubic method of interpolation to create a spline function across a set of data points. The data points are defined in the SPLINE statement in Adams Solver (FORTRAN) data deck. The SPLINE that you define in the Adams Solver dataset may represent a curve (x-y points) or a surface (x-y-z points). Interpolation in the y direction is cubic and interpolation in the z direction is linear. To interpolate the values specified in a curve, set z = 0.
iord specifies the order of the derivative and may be used only when interpolating a curve (that is, when z = 0).
CUBSPL, though not as fast as AKISPL, always produces good results for the value of the function being approximated, its first and second derivatives. There is no requirement on the data points being evenly spaced. This may be an important consideration when you use splines to define functions in Adams Solver (FORTRAN). The solution process often requires estimates of derivatives of the functions being defined. The smoother a derivative is, the easier it is for the solution process to converge.
If the spline data contains sudden changes in value, the CUBSPL function gives more oscillatory results for the curve or surface than are given by the AKISPL function.
For more information on the cubic method of interpolation, see the references listed in
Additional Publications.
Examples
SPLINE/1,
, X= -3, -2, -1, 0, 1, 2, 3
, Y= -67.4, -48.6, -33.7, 4.8, 24.12, 37.6, 48.4
SFORCE/1, I=409, J=109, TRANSLATION,
, FUNCTION=CUBSPL(TIME, 0, 1)
This SFORCE statement defines the translational force acting between Markers 409 and 109. The SPLINE statement provides the discrete data used to generate the interpolation function using the cubic spline. Since the SPLINE statement defines only one curve, the value of z is defined to be 0.
See other
Interpolation available.