dae (version 3.1-23)

mat.dirsum: 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.

See Also

mat.dirprod, matmult

Examples

Run this code
# NOT RUN {
       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))
# }

Run the code above in your browser using DataCamp Workspace