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

constConv

Conversion of constant matrices


Description

Conversion between the 'matrix' and 'polyMatrix' class representation of constant matrices.

Usage

M2pM(m, class=CLASS_MARRAY)
  pM2M(pM)

Arguments

m

a matrix class object

class

the required class of the value: CLASS_MARRAY, CLASS_MBROAD, CLASS_MCELLS, and CLASS_MDLIST

pM

a polyMatrix class object

Details

M2pM converts the matrix class objets to an polyMatrix class object. pM2M converts the zero degree polyMatrix class objects to an matrix object.

Value

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.

See Also

Examples

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)

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.