BlockMatrix: Combine Matrices into a Block Diagonal Matrix

View source: R/BlockMatrix.R

BlockMatrixR Documentation

Combine Matrices into a Block Diagonal Matrix

Description

Creates a block diagonal matrix with its arguments as the blocks.

Usage

BlockMatrix(...)

Arguments

...

Matrices that should be put on the diagonal.

Details

BlockMatrix() tries to coerce its arguments to a matrix, using as.matrix.

Value

Block diagonal matrix having the specified matrices on its diagonal.

Author(s)

Dylan Beijers, dylanbeijers@gmail.com

Examples

BlockMatrix(diag(ceiling(9 * stats::runif(5))), matrix(1:8, 4, 2), c(14, 8))

statespacer documentation built on Feb. 16, 2023, 9:48 p.m.