kprod: Iterated Kronecker product

Description Usage Arguments Details Value Examples

View source: R/helpers.r

Description

Compute the Kronecker product of several matrices.

Usage

1

Arguments

...

a listing of matrices

Details

If kronecker is the function that computes A x B, kprod computes A x B x C and so on; it's a wrapper of Reduce and kronecker.

Value

... a matrix that is the kronecker product of those matrices (from left to right)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
kprod(diag(2), t(ones(2)))
kprod(t(ones(2)), diag(2))

kprod(diag(2), t(ones(2)), t(ones(2)))
kprod(t(ones(2)), diag(2), t(ones(2)))
kprod(t(ones(2)), t(ones(2)), diag(2))


rbind(
  kprod(diag(2), t(ones(2))),
  kprod(t(ones(2)), diag(2))
)

algstat documentation built on May 29, 2017, 10:34 p.m.

Related to kprod in algstat...