Tabulated function definition
- @TABULATED_FUNCTION_DEFINITION {
- @TABULATED_FUNCTION_NAME {TblFunName} {
- @FUNCTION_1D_TYPE {Fun1DType}
- @TABLE_ENTRIES {
- @X_ENTRY {x_{i}}
- @Y_ENTRY {F_{i}}
- @X_ENTRY {x_{j}}
- @Y_ENTRY {F_{j}}
- }
- @NUMBER_OF_CHEBYSHEV_COEFFICIENTS {N}
- @COMMENTS {CommentText}
- }
- }
Introduction
A tabulated function is a single entry table that lists the values of a function at discrete points. It describes a function of a single variable, F = F(x), where x is the independent variable and F the value of the function. For some applications, a continuous description of function F = F(x) is required. In that case, the discrete function must be approximated by its expansion in terms of Chebyshev polynomials. Tabulated function are used in conjunction with 1D functions. A plot of the function will be generated if plotting control parameters are defined.
NOTES
- The nature of the data entered in the tabulated function is determined by parameter Fun1DType.
- Possible values of parameter Fun1DType are listed for the associated function 1D.
- Parameters Fun1DType defined for the tabulated function and associated function 1D must match.
- Parameter Fun1DType defines the units of the x_{i} and F_{i} entries of the tabulated function.
- Keyword @TABLE_ENTRIES introduces the list of tabulated function values. Any number of entries can be defined. @X_ENTRY values x_{i} must appear in a non-decreasing sequence. Each table entry is defined by two keywords.
- Keyword @X_ENTRY defines a discrete value of the independent variable, x_{i}.
- Keyword @Y_ENTRY defines the corresponding discrete value of the function F_{i} = F (x_{i}) of the table.
- If keyword @NUMBER_OF_CHEBYSHEV_COEFFICIENTS appears, the tabulated data will be approximated by means of a Chebyshev expansion using N Chebyshev polynomials.
- It is possible to attach comments to the definition of the object; these comments have no effect on its definition.
Interpolation in tabulated functions
Tabulated functions are defined by a non-decreasing sequence of independent variable values x_{i} and corresponding function values F_{i}. For an arbitrary value of the independent variable, table values are interpolated linearly. Let an arbitrary entry be defined as
x_{i + α} = (1 - α) x_{i} + α x_{i + 1}, 0 ≤ α ≤ 1,
where x_{i} and x_{i + 1} are two consecutive entries in the table. The interpolated function values are then
F_{i + α} = (1 - α) F_{i} + α F_{i + 1}.