Conversion of constant matrices
Conversion between the 'matrix' and 'polyMatrix' class representation of constant matrices.
M2pM(m, class=CLASS_MARRAY) pM2M(pM)
m |
a matrix class object |
class |
the required class of the value: |
pM |
a polyMatrix class object |
M2pM converts the matrix class objets to an polyMatrix class object.
pM2M converts the zero degree polyMatrix class objects to an matrix object.
The M2pM(m) returns the given 'm' matrix in 'polyMatrix' class form.
The pM2M(pM) returns the given 'pM' polynomial matrix in 'matrix' class form,
if it is a constant matrix, otherwise gives an error message.
m <- matrix(1:12, 3,4) m pM <- M2pM(m) class(pM) pM M2pM(m, "polyMarray") M2pM(m, "polyMbroad") M2pM(m, "polyMcells") M2pM(m, "polyMdlist") # clean up # rm(m, pM)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.