OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

interp1xy

Contents

Menu Information

Interpolate/Extrapolate

Brief Information

Perform 1D interpolation/extrapolation on a group of XY data to generate a set of interpolated data with uniformly-spaced X values using 3 alternative methods.

Command Line Usage

1. interp1xy iy:=Col(2) method:=spline npts:=50;

2. interp1xy iy:=Col(2) method:=bspline sf:=0.5;

3. interp1xy iy:=Col(2) method:=bspline npts:=50 coef:=Col(3);

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input iy

Input

XYRange

<active>
Specifies the XY range to be interpolated.
Method method

Input

int

linear
Interpolation methods

Option list:

  • linear:Linear
method:=0, Linear interpolation is a fast method of estimating a data point by constructing a line between two neighboring data points. The resulting point may not be an accurate estimation of the missing data.
  • spline:Cubic Spline
method:=1, This method splits the input data into a given number of pieces, and fits each segment with a cubic polynomial. The second derivative of each cubic function is set equal to zero. With these boundary conditions met, an entire function can be constructed in a piece-wise manner.
  • bspline:Cubic B-Spline
method:=2, This method also splits the input data into pieces, each segment is fitted with discrete Bezier splines.
Number of Points npts

Input

int

100
Specifies the number of interpolated points
X Minimum xmin

Input

double

<auto>
The minimum X value of interpolated curve
X Maximum xmax

Input

double

<auto>
The maximum X value of interpolated curve
Boundary boundary

Input

int

notaknot
Boundary condition only available in cubic spline method

Option list:

  • natural:Natural
2nd derivatives are 0 on both end
  • notaknot:Not-A-Knot
3rd derivatives are continuous on the second and last-second point
Apparent Interpolation apparent

Input

int

0
It is available only when the interpolation is performed on a graph. It specifies whether to use the apparent values for interpolation if the types of the axes scales have been changed to other types.
Smoothing Factor sf

Input

int

<auto>
A non-negative parameter that specifies the smoothness of the interpolated curve in Cubic B-Spline interpolation. The factor helps user control the balance between the smoothing and closeness. Larger values will result in smoother curves.
Output oy

Output

XYRange

<new>
Specifies the output XY data range

See the syntax here.

Coefficients coef

Output

vector

<optional>
Show the coefficients or not, and show them in which column.



Examples

1. Import Interpolation.dat on \Samples\Mathematics folder.

2. Highlight column B and select Analysis: Mathematics: Interpolation/Extrapolation... from menu to bring up the dialog.

3. Select Cubic B-spline interpolating method, and enter 50 on the Number of Points edit box.

4. Click OK to execute. Origin will generate a new Y column with 50 interpolated points.

More Information

Please refer to this page in the User Guide for more information:

Related X-Functions

interp1, interp1q, spline, bspline, interp1trace