The degree of a polynomial or a polynomial matrix
The degree of the highest non-zero coefficient of the polynomials.
degree(p, ...)
p |
a |
... |
supplementary options (see |
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.
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)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.