Page 415 - Excel for Scientists and Engineers: Numerical Methods
P. 415
3 92 EXCEL: NUMERICAL METHODS
InterpC
Performs cubic interpolation in a table of x- and y-values, using the LaGrange 4th-order
polynomial. Returns the interpolated y-value corresponding to a specified x-value.
Syntax
InterpC(1ookup-value, known-x Is, known-y Is)
lookup-value the x-value for which you want to find the corresponding y-value by
cubic interpolation
known-x's the range of x-values in the table (independent variable)
kno wn-y's the range of y-values in the table (dependent variable)
Re m a r ks
lookup-value can be either a number or a reference to a cell that contains a
number.
The function cannot handle implicit references; that is, a name or range reference
cannot be used for a range of lookup values.
The values in the table of x- and y-values must be numbers.
The table of x- and y-values must be arranged in ascending order of x-values.
The table of x- and y-values can be either either horizontal or vertical.
The function cannot be used for extrapolation. A lookup value that is either greater
than or less than the range of x-values returns #REF!.
Cubic interpolation uses the values of four adjacent table entries, e.g., at xo, xl, x2
and x3, to interpolate between x1 and x2. The interpolated value is calculated using
the LaGrange 4th-order polynomial:
+ (x - )(x - xZ - x4) Y3 + (x- - xZ)(x - 13) Y4
(x3 - )(x3 - xZ )(x3 - x4 ) (x4 - )(x4 - xZ )(x4 - x3
where x is the lookup value and xl, x2, x3 and x4 are the four values from the table
that bracket lookup-value (see Chapter 5 for further details).
Example
=InterpC(33.3,$A$3:$A$47,$6$3:$B$47) where $A$3:$A$47 is the range containing the
independent or x-values and $6$3:$6$47 is the range containing the dependent or y-
values.
See Also
InterpL, InterpC2