diagonalizematrix: It constructs a block-diagonal matrix.

Description Usage Arguments Examples

View source: R/diagonalizematrix.R

Description

Using a n*m matrix A, this function constructs a block-diagonal matrix with dimension (n*ntimes) * (m*ntimes), with all blocks equal to matrix A and the rest of entries equal to 0.

Usage

1
diagonalizematrix(A, ntimes)

Arguments

A

n*m matrix with the values.

ntimes

number of times.

Examples

1
2
X <- matrix(data=c(1,2,3,4,5,6), nrow=3, ncol=2)
diagonalizematrix(X,3)

sae documentation built on March 26, 2020, 7:52 p.m.