See more related video:Origin VT-0010 Interpolation
Interpolation is a method of estimating and constructing new data points from a discrete set of known data points. Given an X vector, this function interpolates vector Y base on the input curve (XY Range). Origin provides three options for data interpolation: Linear, Cubic spline and Cubic B-spline methods
Linear interpolation is the simplest and fastest data interpolation method. In linear interpolation, the arithmetic mean of two adjacent data points is calculated. This method is useful in situations where low precision can be tolerated. Linear interpolation is also useful for extremely large data sets, because the calculations are not time or computation-power intensive.
The generalization of linear interpolation is polynomial interpolation. Polynomial interpolation requires much more computation power than linear interpolation, and when the polynomial order is high, the fit of the data oscillates wildly. These disadvantages can be avoided by using low-order polynomial fitting, or spline interpolation.
The Cubic spline method uses 3rd order polynomials, and executes data-fitting in a piecewise fashion. spline interpolation incurs less error than linear interpolation, and the interpolant is smoother.
Similar to Cubic spline interpolation, Cubic B-spline interpolation also fits the data in a piecewise fashion, but it uses 3rd order Bezier splines to approximate the data. Cubic B-Splines allow the accurate modeling of more general classes of geometry.
Note: To generate uniform linear spaced interpolated values, use the interp1xy X-Function.
To use this function:
In fact, the interp1 X-Function is called to complete the calculation.
|X Values to Interpolate||
The vector to interpolate on.
The XY range to be interpolated.
Specify interpolation methods
Boundary condition is only available in cubic spline method.
Smoothing is only available in Cubic B-Spline method.
|Result of interpolation||
The output vector.
Spline coefficients when using spline or B-spline method.
Given a sequence of distinct pairs of data (, ), where . we are looking for the interpolated at by the following methods:
1. Linear interpolation (interp1q)
2. Cubic spline (spline)
Origin uses the natural cubic spline to do interpolation:
And can be generated from:
For boundary points, we set and equal to zero.
3. Cubic B-spline (bspline)
For or perform linear interpolation.
Here, Failed to parse (Missing texvc executable; please see math/README to configure.): N(x)\!
denotes the normalized cubic B-spline defined upon the knots , , ..., , And denotes the coefficient of the corresponding function.
The total number of these knots and their values , ..., are chosen automatically by the function. The knots , ..., are the interior knots; they divide the approximation interval [, ] in to sub-intervals. The coefficients , , ..., are then determined as the solution of the following constrained minimization problem:
subject to the constraint
where stands for the discontinuity jump in the third order derivative of at the interior knot , denotes the weighted residual , and S is a non-negatative number to be specified by the user.
The quantity can be seen as a measure of the (lack of) smoothness of , while closeness of fit is measured through . By means of the parameter , 'the smoothing factor', the user will then control the balance between these two (usually conflicting) properties. If is too large, the spline will be too smooth and signal will be lost (underfit); if is too small, the spline will pick up too much noise (overfit). In the extreme cases the function will return an interpolating spline (=0) is is set to zero, and the weighted least-squares cubic polynomial (=0) is if set very large. Experimenting with values between these two extremes should result in a good compromise.
1. Michelle Schatzman. Numerical Analysis: A Mathematical Introduction, Chapters 4 and 6. Clarendon Press, Oxford (2002).
2. William H. Press, etc. Numerical Recipes in C++. 2nd Edition. Cambridge University Press (2002).
3. Nag C Library Function Document, nag_1d_spline_fit (e02bec).