CompensatingSpline (FPScript)
Interpolates a data set through a compensating spline curve and samples this at definable points.
Syntax
CompensatingSpline(DataSet, N, SamplingMode, Weighting)
or
CompensatingSpline(Amplitude, Time, N, SamplingMode, Weighting)
The syntax of the CompensatingSpline function consists of the following parts:
Part |
Description |
||||||
---|---|---|---|---|---|---|---|
DataSet |
The data set with a constant sampling interval, which is interpolated. If you specify a data series, then the X component will be generated automatically. Permitted data structures are data series, data matrix, signal, signal series und signal series with two-dimensional X-component. All numeric data types are permitted. For complex data types the absolute value is formed. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||
Amplitude |
The Y component of the signal to be interpolated. If you specify a signal, then its Y component is used. Permitted data structures are data series, data matrix, signal, signal series und signal series with two-dimensional X-component. All numeric data types are permitted. For complex data types the absolute value is formed. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||
Time |
The X component of the signal to be interpolated. If you specify a signal, then its Y component is used. Permitted data structures are data series, data matrix, signal, signal series und signal series with two-dimensional X-component. All numeric data types are permitted. For complex data types the absolute value is formed. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||
N |
Specifies the total number of points or per X interval of the signal. Permitted data structures are scalar value. All integral data types are permitted. The value must be greater or equal to 1. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||
SamplingMode |
Specifies how the calculated spline curve is to be sampled. The argument SamplingMode can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||
Weighting |
Specifies the compensation measure for the spline curve. Values close to zero result in the best straight line, very high values result in a natural spline curve. Permitted data structures are scalar value. All real data types are permitted. The value must be greater than 0. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
Remarks
The result always has the data type 64-bit floating point.
The result has the same unit as the argument DataSet.
A spline curve consists of cubic polynomials that are appended to one another to provide as smooth a course as possible. In the approximating spline function, the polynomials do not necessarily pass through the points of the data set, but instead even them out. You can vary the compensation measure from the natural spline function, which passes through the points, up to the best approximating straight line. The Y component of the data set to be interpolated must contain at least 3 values and the X component must be strictly increasing. Before the spline interpolation, void values in the Y component are eliminated by linear interpolation.
The following illustration shows compensating spline curves with different weightings:
Available in
FlexPro Basic, Professional, Developer Suite
Examples
CompensatingSpline({1, 2, 6, 9, 4, 7, 6, 4, 2}, 100, SPLINE_EQUIDISTANT, 0.0001) |
Interpolates the data set through a compensating spline curve. The result is a best straight line with 100 points. |
CompensatingSpline({1, 2, 6, 9, 4, 7, 6, 4, 2}, 100, SPLINE_EQUIDISTANT, 1000) |
Interpolates the data set through a compensating spline curve. The result is a natural spline curve with 100 points. |
See Also
Spline Interpolation Analysis Object
Surface Interpolation Analysis Object
References
[1] "Carl de Boor": "A Practical Guide to Splines, Revised Edition". "Springer-Verlag, New York",2001.ISBN 0-387-95366-3.