Skip to contents

Gives the factors comprising the companion factorisation of a multi-companion matrix.

Usage

mc_factors(x, what = "mc")

Arguments

x

a multi-companion matrix, an object of class MultiCompanion.

what

format of the result, see below.

Details

If the factors are available in the object's pad in the requested format, they are returned without further processing. The factors may be available if they have been previously computed or if the matrix has been created from the factors.

If the factors are available, but not in the requested format, they are converted to it. Otherwise the factors are computed.

The factors are stored in the object's pad under the name "mC.factors" when what == "mc", and in "mC.factorsmat" otherwise.

Value

If what == "mc" the companion factors of x as a list of

MultiCompanion objects.

Otherwise a matrix with i-th row representing the i-th factor.

As a side effect, the factors are stored in the object's pad, see `Details'.

References

Boshnakov GN (2002). “Multi-companion matrices.” Linear Algebra Appl., 354, 53--83. ISSN 0024-3795, doi:10.1016/S0024-3795(01)00475-X .

Author

Georgi N. Boshnakov

Examples

m <- mCompanion(matrix(1:8, nrow = 2))
mc_factors(m)
#> [[1]]
#> 4 x 4 Matrix of class "MultiCompanion"
#>       [,1]  [,2] [,3]  [,4]
#> [1,] 0.875 -0.75 -0.5 -0.25
#> [2,] 1.000  0.00  0.0  0.00
#> [3,] 0.000  1.00  0.0  0.00
#> [4,] 0.000  0.00  1.0  0.00
#> 
#> [[2]]
#> 4 x 4 Matrix of class "MultiCompanion"
#>      [,1] [,2] [,3] [,4]
#> [1,]    2    4    6    8
#> [2,]    1    0    0    0
#> [3,]    0    1    0    0
#> [4,]    0    0    1    0
#>