|
NAG[e02akc] NAG[nag_1d_cheb_eval2] - Evaluation of fitted polynomial in one variable from Chebyshev series form
|
|
Calling Sequence
e02akc(n, xmin, xmax, a, ia1, x, result, 'fail'=fail)
nag_1d_cheb_eval2(. . .)
Parameters
|
n - integer;
|
|
|
On entry: , the degree of the given polynomial .
|
|
Constraint: . .
|
|
|
xmin - float;
xmax - float;
|
|
|
On entry: the lower and upper end points respectively of the interval . The Chebyshev-series representation is in terms of the normalized variable , where
|
|
Constraint: . .
|
|
|
a - Vector(1.. , datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array a must be at least .
|
|
|
ia1 - integer;
|
|
|
On entry: the index increment of a. Most frequently, the Chebyshev coefficients are stored in adjacent elements of a, and ia1 must be set to 1. However, if, for example, they are stored in , then the value of ia1 must be 3.
|
|
Constraint: . .
|
|
|
x - float;
|
|
|
On entry: the argument at which the polynomial is to be evaluated.
|
|
Constraint: . .
|
|
|
result - assignable;
|
|
|
Note: On exit the variable result will have a value of type float.
|
|
On exit: the value of the polynomial .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_1d_cheb_eval2 (e02akc) evaluates a polynomial from its Chebyshev-series representation, allowing an arbitrary index increment for accessing the array of coefficients.
|
|
Error Indicators and Warnings
|
|
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_REAL_2"
On entry, : , .
"NE_REAL_3"
On entry, x does not lie in : , , .
|
|
Further Comments
|
|
The time taken is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 6:
xmin := -0.5:
xmax := 2.5:
ia1 := 1:
x := -0.5:
a := Vector([2.53213, 1.13032, 0.2715, 0.04434, 0.00547, 0.00054, 4e-05], datatype=float[8]):
NAG:-e02akc(n, xmin, xmax, a, ia1, x, result):
|
|
|
See Also
|
|
Clenshaw C W (1955) A note on the summation of Chebyshev series Math. Tables Aids Comput. 9 118–120
Cox M G (1973) A data-fitting package for the non-specialist user NPL Report NAC 40 National Physical Laboratory
Cox M G and Hayes J G (1973) Curve fitting: a guide and suite of algorithms for the non-specialist user NPL Report NAC26 National Physical Laboratory
Gentleman W M (1969) An error analysis of Goertzel's (Watt's) method for computing Fourier coefficients Comput. J. 12 160–165
e02 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|