Learn R Programming

cta (version 1.3.0)

block.fct: Matrix Direct Sum

Description

Matrix direct sum function. Creates a block diagonal matrix.

Usage

block.fct(...)

Arguments

...

R matrices (matrix).

Value

block.fct returns a block diagonal matrix, where the direct sum is in the order of the input matrices (matrix).

Examples

Run this code
# NOT RUN {
A <- matrix(c(1, 2, 3, 4), nrow = 2, byrow = TRUE)
B <- matrix(c(5, 6, 7, 8, 9, 10), nrow = 2, byrow = TRUE)
C <- matrix(c(11, 12, 13, 14), nrow = 1, byrow = TRUE)
block.fct(A, B, C)
# }

Run the code above in your browser using DataLab