KRONECKER

This procedure computes the Kronecker product of two matrices.

Usage

The KRONECKER stored procedure has the following syntax:
KRONECKER(matrixAname,matrixBname,matrixCname)
Parameters
matrixAname
The name of input matrix A.
Type: NVARCHAR(ANY)
matrixBname
The name of input matrix B.
Type: NVARCHAR(ANY)
matrixCname
The name of output matrix C.
Type: NVARCHAR(ANY)
Returns
BOOLEAN TRUE, if successful.

Details

Matrices A and B DO NOT need to have the same dimensions, that is, number of rows and columns. The resulting matrix C has dimensions corresponding to the products of the respective dimensions of A and B. Matrix C must not exist prior to the operation. If A is an m by n matrix and B is a k by l matrix, then the Kronecker product m * k by n * l matrix such that C_{i * k + r, j * l + s} = A_{i, j} * B_{r, s}.

Examples

CALL nzm..SHAPE('1,10,1000,10000', 2, 2, 'A');
CALL nzm..SHAPE('2,5,7,19', 2, 2, 'B');
CALL nzm..KRONECKER('A', 'B', 'C');
CALL nzm..PRINT('C');
CALL nzm..DELETE_MATRIX('A');
CALL nzm..DELETE_MATRIX('B');
CALL nzm..DELETE_MATRIX('C');

 SHAPE
-------
 t
(1 row)

 SHAPE
-------
 t
(1 row)

KRONECKER
-----------
t
(1 row)

                           PRINT
-----------------------------------------------------------------
 -- matrix: C --
 2, 5, 20, 50
 7, 19, 70, 190
 2000, 5000, 20000, 50000
 7000, 19000, 70000, 190000
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)