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)参数
| 名称 | 说明 | 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 |
示例
In the following example, the table 下方 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 使用 following ex按下ion:
LinearInterpolation(2.5, 2, 3, 4, 6)The result is 3.75 (numeric value).
更多信息
更多信息 about linear interpolations can be found on Wikipedia.