CubicSpline
Mon 01 January 2018Syntax
CubicSpline(DataPoints, Control_Option, Left_Constraint, Right_Constraint)
Description
Use the CubicSpline function to compute a cubic spline interpolation through a set of at least four datapoints.
Parameters
Field or Control |
Definition |
---|---|
DataPoints |
This parameter takes an array of array of number. The arrayâs contents are an array of six numbers. The first two of these six numbers are the x and y points to be fit. The last four are the four coefficients to be returned from the function: a , b , c and d . a is the coefficient of the x 0 term, b is the coefficient of the x 1 term, c is the coefficient of the x 2 term, and d is the coefficient of the x 3 term. |
Control_Option |
Specifies the control option. This parameter takes either a number or constant value. The values are: |
Numeric Value |
Constant Value |
Description |
---|---|---|
0 |
%SplineOpt_SlEstEst |
Generate an internal estimate of the beginning and ending slope of the cubic piecewise equations |
1 |
%SplineOpt_SlSetEst |
Use the user-specified value for the slope of the leftmost point, and generate an estimate for the rightmost point |
2 |
%SplineOpt_SlEstSet |
Use the user-specified value for the slope of the rightmost point, and generate an estimate for the leftmost point |
3 |
%SplineOpt_SlSetSet |
Use the user-specified values for the slopes of the leftmost and rightmost points |
4 |
%SplineOpt_CvEstEst |
Generate an internal estimate of the beginning and ending curvature of the cubic piecewise equations |
5 |
%SplineOpt_CvSetEst |
Use the user-specified value for the curvature of the leftmost point, and generate an estimate for the rightmost point |
6 |
%SplineOpt_CvEstSet |
Use the user-specified value for the curvature of the rightmost point, and generate an estimate for the leftmost point |
7 |
%SplineOpt_CvSetSet |
Use the user-specified values for the curvatures of the leftmost and rightmost points |
8 |
%SplineOpt_ClEstEst |
Generate an internal estimate of the beginning and ending curl of the cubic piecewise equations |
9 |
%SplineOpt_ClSetEst |
Use the user-specified value for the curl of the leftmost point, and generate an estimate for the rightmost point |
10 |
%SplineOpt_ClEstSet |
Use the user-specified value for the curl of the rightmost point, and generate an estimate for the leftmost point |
11 |
%SplineOpt_ClSetSet |
Use the user-specified values for the curls of the leftmost and rightmost points |
12 |
%SplineOpt_Natural |
Generate a ânaturalâ spline |
13 |
%SplineOpt_ContCurl |
Generate a spline wherein the equation for the first segment is the exact same equation for the second segment, and where the equation for the penultimate segment is the same as the equation for the last segment. |
Field or Control |
Definition |
---|---|
Left_Constraint |
A single number for the constraint for the left point. Specify a zero if this parameter isnât needed. |
Right_Constraint |
A single number for the constraint for the right point. Specify a zero if this parameter isnât needed. |
Returns
A modified array of array of numbers. The elements in the array correspond to the elements in the array used for DataPoints .