Tabular functions of one argument are items of the
TABULAR-FUNCTION-OF-1-ARG class, referred to henceforth as tabular functions.
f (x)
If you create a tabular function of arithmetic values, you can direct G2 to interpolate a return value for an argument that
is not given in the table. G2 performs a straight-line interpolation whenever it interpolates one or more missing values. If you do not direct G2 to interpolate values, and a value of x is not given in the table, function evaluation fails. Two examples illustrating different uses of tabular functions are:
![]() |
To create a new tabular function of one argument:
Choose KB Workspace > New Definition > tabular-function-of-1-arg
![]() |
Notice that a tabular function has two table menu choices:
table, which displays the attribute table
table of values, which lets you add and delete rows and display the table contents once they exist
Naming the Tabular Function
The Names attribute provides the name to use when referring to the function within expressions. After completing this attribute, the name replaces the f(x) label in the table of values for the function. Sorting the Items in the Table
The Keep-sorted attribute specifies whether G2 sorts the function arguments, referred to as the values of x, or the values that correspond to the arguments, referred to as f (x). by values for this attribute. Interpolating Function Values
The Interpolate? attribute specifies whether G2 interpolates a value for f (x) when the value of x is not explicitly given in the table. percent-of-max-flow function has these values:
![]() |
G2 interpolates for all values of x in the range of 10 to 50. For example, if x is
15, G2 interpolates the percent-of-max-flow as 45. For interpolation to occur, the value of x must be greater than or equal to the smallest argument in the table and less than or equal to the largest argument in the table. If the argument is not in this range, G2 fails to evaluate the function. Adding and Deleting Values and Arguments
For each tabular function, you enter one or more arguments, and a corresponding number of return values. G2 can complete a list of multiple arguments and return values, after you supply the first two entries.
To show the tabular function values table:
table of values from the menu for the function's icon.
x and f(x):
![]() |
To record values in the tabular function table:
add or delete rows from the table of values.
add integer [unfinished] row[s]
[ {at the {beginning | end} } | { {before | after} x = datum} ]
with x = [datum1] [datum2] [,...] | etc.}
and f (x) = [ datum] [datum2] [,...] | etc.} ] ]
add 7 rows with x = 0, 10, etc. and f(x) = 0, 30, 60, 75, 80, 87, 91
![]() |
x = 55, G2 automatically places that row after the row that has 50 as an argument value.
delete { integer | unfinished} row[s]
[ {at the {beginning | end} } | { {before | after} x = datum} ]
[with x = [datum-1] [datum-2] [,...] | etc. ]
and f (x) = [datum-1] [datum-2] [,...] | etc. ]