coef.minimaxApprox {minimaxApprox}R Documentation

Extract coefficients from a "minimaxApprox" object

Description

Extracts the numerator and denominator vectors from a "minimaxApprox" object. For objects with both Chebyshev and monomial coefficients, it will extract both.

Usage

## S3 method for class 'minimaxApprox'
coef(object, ...)

Arguments

object

An object inheriting from class "minimaxApprox".

...

Other arguments.

Value

Coefficients extracted from the "minimaxApprox" object. A list containing:

a

The polynomial coefficients or the rational numerator coefficients.

b

The rational denominator coefficients. Missing for polynomial approximation.

aMono

The polynomial coefficients or the rational numerator coefficients for the monomial basis when the approximation was done using Chebyshev polynomials. Missing if only the monomial basis was used.

bMono

The rational denominator coefficients for the monomial basis when the approximation was done using Chebyshev polynomials. Missing if either only the monomial basis was used or for polynomial approximation.

Author(s)

Avraham Adler Avraham.Adler@gmail.com

See Also

minimaxApprox

Examples

PP <- minimaxApprox(exp, 0, 1, 5)
coef(PP)
identical(unlist(coef(PP), use.names = FALSE), c(PP$a, PP$aMono))

RR <- minimaxApprox(exp, 0, 1, c(2, 3), basis = "m")
coef(RR)
identical(coef(RR), list(a = RR$a, b = RR$b))

[Package minimaxApprox version 0.4.3 Index]