Accessing Table Function Values

To get the value of a table function for some argument, call the table function as any other function by its name, passing the argument value as the function parameter. For instance, if you have a table function named lookup1 in your model, to get the function value for the argument 5, call:


Alternatively, you can use the function get(double x) of the table function. For the example, considered above, the function call should be:


Both functions are identical. They return the table function value corresponding to the given argument, subject to the currently set interpolation type and out of range handling. In case the function only supports discrete values (that were provided as the argument set), and no interpolation is allowed, a call of such a function with an argument not matching any argument entry would result in exception thrown.

Related topics

 Table functions

 Function behavior in infeasible area

 Table function interpolation