Learn R Programming

minimaxApprox (version 0.4.3)

coef.minimaxApprox: 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 minimaxApprox
coef(object, ...)

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.

Arguments

object

An object inheriting from class "minimaxApprox".

...

Other arguments.

Author

Avraham Adler Avraham.Adler@gmail.com

See Also

minimaxApprox

Examples

Run this code
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))

Run the code above in your browser using DataLab