whelock.blogg.se

Idl interpol
Idl interpol





idl interpol

If set, interpolate by fitting a cubic spline to the 4 point neighborhood (x, x, x, x) surrounding the interval, x ≤ XOUT < x.

idl interpol

The output will contain NaN's in locations where the interpolation The default behavior is to include the NaN values - by including NaN's Set this keyword to filter out NaN values before interpolating. If set, interpolate by fitting a quadratic y = a + bx + cx 2, to the three point neighborhood (x, x, x) surrounding the interval x ≤ XOUT < x. If set, interpolate using a least squares quadratic fit to the equation y = a + bx + cx 2, for each 4 point neighborhood (x, x, x, x) surrounding the interval of the interpolate, x ≤ XOUT < x. The result will have the same number of elements as XOUT. X must have the same number of elements as V, and the values must be strictly ascending or descending. The abscissa values for V, in the irregularly-gridded case. The abscissa values for the output grid will contain the same endpoints as the input. The number of points in the result when both input and output grids are regular. ArgumentsĪn input vector of any type except string. The result is a single- or double-precision floating-point vector, or a complex vector if the input vector is complex. Result = INTERPOL( V, X, XOUT ) Return Value p = PLOT(x, y, COLOR= 'red', NAME= 'Original data', $ TITLE= 'INTERPOL example') q = SCATTERPLOT(xinterp, result, SYMBOL= 'square', /OVERPLOT, $ NAME= 'Interpolated values') lgd = LEGEND(POSITION=, /DATA, SHADOW= 0, LINESTYLE= 'none') Syntax result = INTERPOL(y, x, xinterp) Plot the original sine wave and the interpolated values. xinterp = RANDOMU( 1, 10)* 6 - 3 Interpolate. Make a sine wave on the interval x = FINDGEN( 61)/ 10 - 3 y = SIN(x) Define a set of 10 locations where interpolates are desired. ExamplesĬreate a floating-point vector of 61 elements in the range. Its source code can be found in the file interpol.pro in the lib subdirectory of the IDL distribution.

idl interpol

This routine is written in the IDL language. Note: The INTERPOL function automatically detects any NaN values in your input data, and excludes these values when computing the interpolation.

idl interpol

The INTERPOL function performs linear, quadratic, or spline interpolation on vectors with a regular or irregular grid.







Idl interpol