Learn R Programming

polyMatrix (version 0.3.1)

coefs.polyMatrix: The coefficients of a polynom or polynomial matrix

Description

Returns the coefficients of the given polynom or polynomial matrix.

Usage

coefs(p,degree="all")
       # S3 method for polynomial
coefs(p,degree="all")
       # S3 method for polyMatrix
coefs(p,degree="all")

Arguments

p

a polynomial or polyMatrix class object

degree

"all" or the serial numben of requested coefficients.

Value

A vector of the requested coefficients of the input polynom or a list of the requested coefficient matrices of the input polyMatrix.

Details

The coefs consists of two methods. One for a polynomial objects, the other one for polyMatrix objects.

Examples

Run this code
# NOT RUN {
coefs(polynom::polynomial(12:0))
coefs(polynom::polynomial(12:0),degree=c(2,3))
coefs(polyMgen.a())
coefs(polyMgen.b())
coefs(polyMgen.c())
coefs(polyMgen.d())
coefs(polyMgen.d(),degree=1)
# }

Run the code above in your browser using DataLab