Difference between revisions of "CubicInterp"

Line 11: Line 11:
 
[[Image:Cubicinterp-graph.png]]
 
[[Image:Cubicinterp-graph.png]]
  
= Declaration =
+
A cubic interpolation can vary wildly from the actual values of the data points.  In the above graph, all the ''r'' values are positive, yet the interpolation is as small as -22.5 around x=33.  Even if the ''r'' values are monotonically increasing, this does not mean that the cubic interpolation will be monotonically increasing.  The [[MonoCubicInterp]] function is a variation that provides a guarantee of monotonicity.
  
CubicInterp( D,R : Numeric[I] ; X : numeric ; I : Index )
+
= Library =
 +
 
 +
Array functions
  
 
= See also =
 
= See also =

Revision as of 02:57, 12 August 2008


CubicInterp(d,r,x,I)

Returns the natural cubic spline interpolated values of r along d, interpolating for values of X. The points (r,d) that get interpolated are indexed by I. The values of d must be ascending. The index I is optional when d and r have only one index is common; however, it is recommended that you explicitly specify I, since this will enable your expression to array-abstract if any dimension is ever added to d and r in the future.

Null values are allowed in d and r only in releases later than 4.1.1 (not including 4.1.1). Points having either d or r equal to null are ignored. When x is null, the result is null.

Cubicinterp-graph.png

A cubic interpolation can vary wildly from the actual values of the data points. In the above graph, all the r values are positive, yet the interpolation is as small as -22.5 around x=33. Even if the r values are monotonically increasing, this does not mean that the cubic interpolation will be monotonically increasing. The MonoCubicInterp function is a variation that provides a guarantee of monotonicity.

Library

Array functions

See also

Comments


You are not allowed to post comments.