# NOT RUN {
# numerical matrices
matrix.degree(matrix(1:6, 2, 3))
## [,1] [,2] [,3]
## [1,] 0 0 0
## [2,] 0 0 0
# polynomials
matrix.degree(parse.polynomial("x + 1")) ## 1
matrix.degree(parse.polynomial("x^3 + 1")) ## 3
matrix.degree(parse.polynomial("1")) ## 0
# polynomial matrices
matrix.degree(parse.polyMatrix(
"x; x^2 + 1",
"0; 2x"))
## [,1] [,2]
## [1,] 1 2
## [2,] 0 1
# }
Run the code above in your browser using DataLab