VINTERPOLATE procedure
Performs linear & inverse linear interpolation between variates (R.J. Reader).
Options
Parameters
Description
VINTERPOLATE performs linear interpolation and inverse linear interpolation between variates, as was given by the Genstat 4 functions LINT and INLINT. The y-values (or data values) are given in a set of variates, contained in the pointer specified by the OLDVALUES parameter. The corresponding x-values (intervals) are specified by the OLDINTERVALS parameter, in a variate with one value for each variate of the OLDVALUES pointer. For interpolation (METHOD=value), values are interpolated at the x-values specified by the variates or scalars contained in the NEWINTERVALS pointer, and are stored in variates contained in the NEWVALUES parameter. For inverse interpolation (METHOD=interval), x-values are estimated for the y-values specified by the variates or scalars contained in the NEWVALUES pointer, and are stored in variates contained in the NEWINTERVALS pointer. Where two or more successive OLDINTERVALS or OLDVALUES are the same, there is no unique solution to the interpolation; the RANGE option allows the smallest (RANGE=first), largest (RANGE=last) or the mean of these two (RANGE=middle) values or intervals to be selected.
Options: METHOD, RANGE.
Parameters: OLDVALUES, NEWVALUES, OLDINTERVALS, NEWINTERVALS.
Method
An estimate of the required value is calculated from each successive pair of points. If this estimate is between the two points from which it was calculated, it is a valid answer i.e. it was produced by interpolation not extrapolation. If it does not satisfy this condition it is set to missing. If the curve is horizontal or vertical at the point of interpolation, more than one point will satisfy the above condition. In this case the value returned will depend on the setting of the option RANGE. This will determine whether the smallest value found, the largest value found, or the mean of these two values is returned. The default is to return the mean value.
Action with
RESTRICT
If any of the variates in the OLDVALUES pointer is restricted, the other variates in the pointer must either have the same restriction or be unrestricted. Missing values are then returned for the units excluded by the restriction. The OLDINTERVALS variate must not be restricted.