mat.dirsum: Forms the direct sum of a list of matrices

mat.dirsumR Documentation

Forms the direct sum of a list of matrices

Description

The direct sum is the partitioned matrices whose diagonal submatrices are the matrices from which the direct sum is to be formed and whose off-diagonal submatrices are conformable matrices of zeroes. The resulting matrix is m \times n, where m is the sum of the numbers of rows of the contributing matrices and n is the sum of their numbers of columns.

Usage

mat.dirsum(matrices)

Arguments

matrices

A list, each of whose component is a matrix.

Value

An m \times n matrix.

Author(s)

Chris Brien

See Also

mat.dirprod, matmult

Examples

       m1 <- matrix(1:4, nrow=2)
       m2 <- matrix(11:16, nrow=3)
       m3 <- diag(1, nrow=2, ncol=2)
       dsum <- mat.dirsum(list(m1, m2, m3))

dae documentation built on June 22, 2024, 9:07 a.m.