matrix-kron: Kronecker Product

Description Usage Arguments Details Note References Examples

Description

Returns the Kronecker product.

Usage

1
kron(x, y)

Arguments

x, y

two numeric matrixes.

Details

The Kronecker product can be computed using the operator %x% or alternatively using the function kron for SPlus compatibility.

Note

kron is a synonyme to %x%.

References

Golub, van Loan, (1996); Matrix Computations, 3rd edition. Johns Hopkins University Press.

Examples

1
2
3
4
5
6
7
8
## Create Pascal Matrix:
   P = pascal(3)
   P
   
## Return the Kronecker Product                     
   kron(P, diag(3))
   P 
                           

Example output

Loading required package: timeDate
Loading required package: timeSeries
     [,1] [,2] [,3]
[1,]    1    1    1
[2,]    1    2    3
[3,]    1    3    6
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
 [1,]    1    0    0    1    0    0    1    0    0
 [2,]    0    1    0    0    1    0    0    1    0
 [3,]    0    0    1    0    0    1    0    0    1
 [4,]    1    0    0    2    0    0    3    0    0
 [5,]    0    1    0    0    2    0    0    3    0
 [6,]    0    0    1    0    0    2    0    0    3
 [7,]    1    0    0    3    0    0    6    0    0
 [8,]    0    1    0    0    3    0    0    6    0
 [9,]    0    0    1    0    0    3    0    0    6
     [,1] [,2] [,3]
[1,]    1    1    1
[2,]    1    2    3
[3,]    1    3    6

fBasics documentation built on March 13, 2020, 9:09 a.m.

Related to matrix-kron in fBasics...