Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

degree

The degree of a polynomial or a polynomial matrix


Description

The degree of the highest non-zero coefficient of the polynomials.

Usage

degree(p, ...)

Arguments

p

a polynomial or polyMatrix class object

...

supplementary options (see degree.polyMatrix)

Value

When the input is a polynomial class object, then value is the degree of the polynom.

When the input is a polyMatrix class object, then in case of method="matrix" the value is a matrix by the same size as the input, containing the degrees of the polynomials. In case of method="column" or ="row" the value are maximums of the columns or rows of the polynom matrix degrees. In case of method="default" it is the maximum of the degree of all polynoms.

See Also

Examples

p <- polynom::polynomial(0:12)
class(p) # polynom
degree(p)

pM <- polyMgen.d(3,3,rawData=
   ch2pn(c("-3+x^3","2+4*x","x^2","1","2","3+x","2*x","0","2-3*x")))
pM

degree(pM) #  the maximum degree
degree(pM,"c") # column wise maximum degree
degree(pM,"r") # row wise maximum degree
degree(pM,"m") # matrix: element wise degree

degree(polyMconvert(pM,"polyMarray"),"m") # polyMarray class
degree(polyMconvert(pM,"polyMbroad"),"m") # polyMbroad class
degree(polyMconvert(pM,"polyMcells"),"m") # polyMcells class
degree(polyMconvert(pM,"polyMdlist"),"m") # polyMdlist class

# clean up
# rm(p, pM)

polyMatrix

Infrastructure for Manipulation Polynomial Matrices

v0.3.1
MIT + file LICENSE
Authors
Tamas Prohle [aut], Peter Prohle [aut], Nikolai Ryzhkov [aut, cre], Ildiko Laszlo [aut] (<https://orcid.org/0000-0003-2324-8183>), Ulas Onat Alakent [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.