View source: R/reverse.kronecker.R
reverse.kronecker | R Documentation |
This function takes a matrix that is Kronecker product A \otimes B
(Definition 3.5), where A
is P x Q
and B
is N x M
,
and outputs the matrix B \otimes A
.
reverse.kronecker(ab, p, qq)
ab |
The |
p |
The number of rows of |
qq |
The number of columns of |
The (NP) \times (QM)
matrix B \otimes A
.
kronecker
# Create matrices
(A <- diag(1, 3))
(B <- matrix(1:6, ncol = 2))
# Perform kronecker
(kron <- kronecker(A, B))
# Perform reverse kronecker product
(reverse.kronecker(kron, 3, 3))
# Perform kronecker again
(kron2 <- kronecker(B, A))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.