Creates an one dimensional cubic-spline interpolation object.
It implements different type of end conditions: 'NotAknot' (not-a-knot), 'First' (first derivative) value and 'Second' (second derivative value).
It also implements Hyman's monotonicity constraint filter which ensures that the interpolating spline remains monotonic at the expense of the second derivative of the curve which will no longer be continuous where the filter has been applied.
If the interpolating spline is already monotonic, the Hyman filter leaves it unchanged.
See R. L. Dougherty, A. Edelman, and J. M. Hyman, 'Nonnegativity-, Monotonicity-, or Convexity-Preserving Cubic and Quintic Hermite Interpolation' Mathematics Of Computation, v.52, n.186, April 1989, pp471-pp494. Given an 'x' value, you can interpolate for the corresponding 'y' value via the
InterpForValue1D() function.
Furthermore you can execute the
InterpForCubic1st() or
InterpForCubic2nd() functions in order to view the first and second order derivative values for a given 'x' value.
This function creates an object and returns a string-key value to represent this created object.
The TAG value of the string-key returned (second part of the key) is : "InterpCubic1D"
- Key parameter
Key Handle to be used for the new interpolation object.
- Reload parameter
When creating this object for the first time, set this parameter to a positive value. Within Excel, when re-computing a worksheet where you do not wish to recreate the object, set this parameter to zero (0).
- XArray parameter
X values.
- YArray parameter
Y values.
- LeftBC parameter
Left BoundaryCondition type. Possible values are 'NotAknot' (not-a-knot), 'First' (first derivative) value and 'Second' (second derivative value).
- LeftBCVal parameter
Left BoundaryCondition value. If the 'LeftBC' parameter has been filled with either 'First' (for first derivative) or 'Second' (for second derivative) then the derivative value is entered here.
- RightBC parameter
Right BoundaryCondition type. Possible values are 'NotAknot' (not-a-knot), 'First' (first derivative) value and 'Second' (second derivative value).
- RightBCVal parameter
Right BoundaryCondition value. If the 'RightBC' parameter has been filled with either 'First' (for first derivative) or 'Second' (for second derivative) then the derivative value is entered here.
- MonoConst parameter
Whether you wish to activate the monotonicity constraint (true) or not (false).
The C# example below contains all the sub-function calls leading up to this function call. As a result, the example can contain a lot of code.
The VB.NET, J#, C++.NET, Java, Excel VBA, Visual Basic 6 (via COM) and C++ examples below contain function code stubs for the calls leading up to this function call. However, the function call for this function is displayed.
You can easily reproduce the stub functions code from the
C# example.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.