LinearInterpolation
The LinearInterpolation function obtains a value by performing a linear interpolation between a set of values given as reference.
Definition
LinearInterpolation(valor, x1, y1, x2, y2, ..., xn, yn)Parameters
| Name | Description | Data type |
|---|---|---|
| valor | Value for which a linear interpolation is desired. | numeric |
| x1, y1, ..., xn, yn | Set of (x, y) points from the reference table used for linear interpolation. The function is limited to a maximum of 20 points (40 x, y values). | numeric |
Example
In the following example, the table below is used to calculate the interpolated value corresponding to x = 2.5.
| X | Y |
|---|---|
| 2 | 3 |
| 2.5 | ? |
| 4 | 6 |
Get the value for x = 2.5
The interpolation result for x = 2.5 can be obtained using the following expression:
LinearInterpolation(2.5, 2, 3, 4, 6)The result is 3.75 (numeric value).
More information
More information about linear interpolations can be found on Wikipedia.