Constructor for Polynomial Matrices
polm.Rdpolm objects represent polynomial matrices
$$a(z) = a_0 + a_1 z + \cdots + a_p z^p$$
If the matrix \(a(z)\) is an \((m,n)\) dimensional polynomial matrix (i.e. the coefficients
\(a_i\) are \((m,n)\) dimensional real or complex valued matrices) then the
polm object stores the coefficients in an (m,n,p+1) dimensional (numeric or complex)
array together with a class attribute c("polm","ratm").
The constructor function polm(a) takes a (numeric or complex) vector, matrix or
3-dimensional array and returns a polm object.
Arguments
- a
either a (numeric or complex) vector, matrix or 3-D array. A vector is coerced to a scalar (i.e. \((1,1)\)-dimensional) polynomial and a matrix gives a polynomial matrix of zero degree.
Details
Any of the dimensions of the 3-dimensional array may also be zero. In particular,
if the third dimension is zero, then the polm object is interpreted as the zero polynomial.
For important methods and functions for this class have a look at the "see also" section.
See also
lpolmobjects allow for coefficient matrices pertaining to negative powers of \(z\).test_polmgenerates random polynomials.checks:
is.polm,is.miniphase, andis.coprime. As a byproductis.coprime(a)computes the zeroes of a square polynomial matrix \(a(z)\).arithmetics:
Ops.ratm, matrix multiplication%r%, polynomial division%/%, polynomial remainder%%, ...degreereturns the degree,col_end_matrixcomputes the column end matrix andprune"simplifies" a polynomial. Note that the degree of the zero polynomial is implemented as being equal to \(-1\), seedegree!reflect_zeroesmay be used to reflect zeroes of a polynomial matrix by multiplication with allpass rational matrices.normal forms: Hermite normal form
hnf, Smith normal formsnf, column reduced formcol_reduceand Wiener Hopf factorizationwhf.companion_matrix,zeroes,pseries,zvalues, ...
Examples
# (1 x 1) polynomial matrix a(z) = 0 + 1z + 2z^2
polm(0:2)
#> ( 1 x 1 ) matrix polynomial with degree <= 2
#> z^0 [,1] z^1 [,1] z^2 [,1]
#> [1,] 0 1 2
# (2 x 3) polynomial matrix a(z) = a0 (degree is zero)
polm(diag(1, nrow = 2, ncol = 3))
#> ( 2 x 3 ) matrix polynomial with degree <= 0
#> z^0 [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
# random (2 x 3) polynomial matrix a(z) = a0 + a1 z + a2 z^2 + a3 z^3 (degree = 3)
polm(array(stats::rnorm(2*3*4), dim = c(2,3,4)))
#> ( 2 x 3 ) matrix polynomial with degree <= 3
#> z^0 [,1] [,2] [,3] z^1 [,1] [,2] [,3]
#> [1,] 0.2421305 0.03389597 0.08850416 -0.7860485 0.9712592 0.9396826
#> [2,] -1.3889653 0.01198896 -1.28305612 0.2450675 1.4402402 -0.2459277
#> z^2 [,1] [,2] [,3] z^3 [,1] [,2] [,3]
#> [1,] 1.0869005 -1.4131850 -0.02417772 1.0536304 0.3893066 -1.7098398
#> [2,] 0.9490698 -0.1739833 -0.14800540 -0.2673505 -0.8020361 0.1034521
# random (2 x 1) polynomial matrix with complex coefficients (degree = 2)
a = polm(array(complex(real = stats::rnorm(2*1*3),
imaginary = stats::rnorm(2*1*3)), dim = c(2,1,3)))
is.polm(a)
#> [1] TRUE
dim(a)
#> m n p
#> 2 1 2
str(a)
#> ( 2 x 1 ) matrix polynomial with degree <= 2
print(a, digits = 3)
#> ( 2 x 1 ) matrix polynomial with degree <= 2
#> z^0 [,1] z^1 [,1] z^2 [,1]
#> [1,] -0.177-0.226i 0.212-0.663i 0.306+0.599i
#> [2,] -1.483-0.607i -0.884+0.236i 0.288+0.062i