powered by
The function compute a string of Khatri-Rao products. A*B*C*..., "*" denotes the Khatri-Rao product. If the list only contains two matrices, kr() return the Khatri-Rao product of two matrices.
kr(x)
a list of matrices
result of a string of Khatri-Rao products
# NOT RUN { #ex1 m1 <- matrix(1:9,3,3) m2 <- matrix(1:12,4,3) m3 <- matrix(13:27,5,3) l1 <- list(m1,m2,m3) kr(l1) #ex2 l2 <- list(m1,m3) kr(l2) # }
Run the code above in your browser using DataLab