Skip to main content
CloudStudio

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

NameDescriptionData type
valorValue for which a linear interpolation is desired.numeric
x1, y1, ..., xn, ynSet 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.

XY
23
2.5?
46

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.

Last updated on

On this page