powered by
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.
n*m
A
(n*ntimes) *
(m*ntimes)
0
diagonalizematrix(A, ntimes)
n*m matrix with the values.
number of times.
# NOT RUN { X <- matrix(data=c(1,2,3,4,5,6), nrow=3, ncol=2) diagonalizematrix(X,3) # }
Run the code above in your browser using DataLab