kron: Kronecker product (Matlab Style)

View source: R/kron.R

kronR Documentation

Kronecker product (Matlab Style)

Description

Kronecker tensor product of two matrices.

Usage

kron(a, b)

Arguments

a

real or complex matrix

b

real or complex matrix

Details

The Kronecker product is a large matrix formed by all products between the elements of a and those of b. The first left block is a11*b, etc.

Value

an (n*p x m*q-matrix, if a is (n x m and b is (p x q).

Note

kron() is an alias for the R function kronecker(), which can also be executed with the binary operator ‘%x%’.

Examples

a <- diag(1, 2, 2)
b <- matrix(1:4, 2, 2)
kron(a, b)
kron(b, a)

pracma documentation built on March 19, 2024, 3:05 a.m.