Cubic Fitting Method (CUBSPL)

Returns either a derivative of a curve or an interpolated value from a curve or surface. The curve is fit exactly through a set of discrete data points using a standard cubic spline fitting method.

Format

CUBSPL (First Independent Variable, Second Independent Variable, Spline Name, Derivative Order)

Arguments

 
First Independent Variable
(Required) A real variable that represents the first independent variable of the spline.
Second Independent Variable
(Optional) A real variable that represents the second independent variable of the spline.
Spline Name
(Required) The name of the existing data element spline modeling entity that defines the set of discrete data points to be used for the interpolation.
Derivative Order
(Optional) The order of the derivative to be taken at the interpolated point (integer).
The legal values are:
0 - returns the curve coordinate value
1 - returns the first derivative
2 - returns the second derivative
Note: Derivative Order may not be specified when interpolating on a surface; that is, when the Second Independent Variable 0.

Example

A spline, spline_1, is defined with discrete data as shown in the following table. The data is then used to generate the interpolation function using the Cubic spline fitting method. Since the spline defines a curve rather than a surface, the Second Independent Variable must be set to 0.
The following example returns the interpolated value of the spline of displacement over time, to define a motion function:
Motion = CUBSPL(TIME, 0, spline_1)
 
Independent variable (Time)
Dependent variable (Displacement)
0
100
1
125
2
130
3
80
4
40
5
20
Spline Defined Based on Tabular Data