SHAPEMTX

This procedure creates a matrix cyclically filled with elements from a row vector.

Usage

The SHAPEMTX stored procedure has the following syntax:
SHAPEMTX(matrixAname,rows,cols,matrixCname)
Parameters
matrixAname
The name of a one-row matrix.
Type: NVARCHAR(ANY)
rows
The number of rows.
Type: INT4
cols
The number of columns.
Type: INT4
matrixCname
The name of output matrix C.
Type: NVARCHAR(ANY)
Returns
BOOLEAN TRUE, if successful.

Details

The row vector is in the form of a one-row matrix. For numerical values passed as a string, see SHAPE.

Examples

call nzm..shape('1,2,3,4',1,4,'A');
call nzm..shapeMtx('A',3,2,'B');
call nzm..print('A');
call nzm..print('B');
call nzm..delete_matrix('A');
call nzm..delete_matrix('B');

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

 SHAPEMTX
----------
 t
(1 row)

          PRINT
----------------------------
 -- matrix: A --
 1, 2, 3, 4
(1row)

             PRINT
--------------------------------
 -- matrix: B --
 1, 2
 3, 4
 1, 2
(1 row)

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

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