Category: Helper Functions
syTableFunction
Returns interpolated value according to given values of two realated variables, or step function value.
Syntax
syTableFunction(NewX, KnownXs, KnownYs, [StepFunction])
The syTableFunction function syntax has the following arguments:
- NewX: required. X (input) value for which table function should return corresponding Y (output) value.
- KnownXs: required. Range or array of known X values.
- KnownYs: required. Range or array of known Y values.
- StepFunction: optional. If False or ommited, function linearly interpolates the output value, if True, it behaves like step function with no interpolation.
Return value is interpolated value according to the given data, or step function value.
Remarks
The element returns a value according to the function that is constructed by (x, y) value pairs. Pairs are given as two ranges or arrays of an equal size. It's not necessary for the values to be sorted beforehand, however the paired values should be adjanced (at the same relative position in range or array).
Function returns #N/A if NewX is outside the defined range.
Examples
=syTableFunction(2,{1,5},{10,60})
- The function returns 22.5.=syTableFunction(4,{1,5},{10,60},True)
- The function returns 10.