Learn R Programming

statespacer (version 0.5.0)

BlockMatrix: Combine Matrices into a Block Diagonal Matrix

Description

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

Usage

BlockMatrix(...)

Value

Block diagonal matrix having the specified matrices on its diagonal.

Arguments

...

Matrices that should be put on the diagonal.

Author

Dylan Beijers, dylanbeijers@gmail.com

Details

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

Examples

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

Run the code above in your browser using DataLab