The Linearize component performs a piecewise linearization of a float and allows to scale the Out slot value depending on the set input values interval. The In slot value is compared with x intervals, and the component estimates the Out slot value based upon the linear function.

Linearize component

The X, Y pairs indicate points along the input curve. For the X value of the input, there is a corresponding Y value of the output. For input values between these points, the component estimates the output based upon the linear equation, therefore, it converts a table of values into a curve using linear interpolation between the values. Individual slope/intercept constants are computed between the X's and Y's using the formula y = mx + b, where m = ym - yn/xm - xn.

If the In value is not in the range of X0 to X9, then output is set to null.

Note: The slope may be positive or negative, and it is indicated by comparing X1 and X0:

• positive if x1 > x0;
• negative if x1 < x0.

Out:= (m * in) + b, where m is the slope between the adjacent points and b is the Y intercept.

## Slots

The Linearize component has the following slots:

• Status: shows the component's status;
• Out: the output value estimated based on the linear function of the input value;
• In: the input value;
• X0-X9: values representing the intervals for the input value;
• Y0-Y9: values representing the internals for the output value.