| diagonalizematrix {sae} | R Documentation |
It constructs a block-diagonal matrix.
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
diagonalizematrix(A, ntimes)
Arguments
A |
|
ntimes |
number of times. |
Examples
X <- matrix(data=c(1,2,3,4,5,6), nrow=3, ncol=2)
diagonalizematrix(X,3)
[Package sae version 1.3 Index]