The degree of a polynomial or a polynomial matrix
The degree of the highest non-zero coefficient of the given polynomials.
## S3 method for class 'polynomial' degree(p, ...) ## S3 method for class 'polyMatrix' degree(p, ...)
p |
a |
... |
~~~~ |
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
is the maximum of the degree of all polynoms.
Method degree_matrix returns a matrix by the same size as the input,
containing the degrees of the polynomials.
And methods degree_column and degree_row returns of
the columns or rows of the polynom matrix degrees.
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.