REPEAT
This procedure creates a new matrix of repeated values.
Usage
The REPEAT stored procedure has the following syntax:
- REPEAT(matrixIn,matrixOut,nrow,ncol)
- Parameters
- matrixIn
- The name of the input matrix.
- matrixOut
- The name of the output matrix.
- nrow
- The row multiplier.
- ncol
- The column multiplier.
Details
The new matrix is of size: nrow*matrixIn.rows x ncol*matrixIn.cols.
Examples
CALL nzm..SHAPE('1,2,3,4,5,0,6,7,8',3,3,'A');
CALL nzm..REPEAT('A','B',2,2);
CALL nzm..PRINT('A');
CALL nzm..PRINT('B');
CALL nzm..DELETE_MATRIX('A');
CALL nzm..DELETE_MATRIX('B');
SHAPE
-------
t
(1 row)
REPEAT
--------
t
(1 row)
PRINT
-----------------------------------------
-- matrix: A --
1, 2, 3
4, 5, 0
6, 7, 8
(1 row)
PRINT
----------------------------------------------------------
-- matrix: B --
1, 2, 3, 1, 2, 3
4, 5, 0, 4, 5, 0
6, 7, 8, 6, 7, 8
1, 2, 3, 1, 2, 3
4, 5, 0, 4, 5, 0
6, 7, 8, 6, 7, 8
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)