Learn R Programming

pracma (version 1.7.9)

kron: 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

Value

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

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.

Examples

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

Run the code above in your browser using DataLab