kr: Compute a string of Khatri-Rao products

Description Usage Arguments Value Examples

View source: R/kr.R

Description

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.

Usage

1
kr(x)

Arguments

x

a list of matrices

Value

result of a string of Khatri-Rao products

Examples

1
2
3
4
5
6
7
8
9
#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)

SuperPCA documentation built on July 26, 2021, 5:06 p.m.

Related to kr in SuperPCA...