REMOVE

This procedure implements the remove operation.

Usage

The REMOVE stored procedure has the following syntax:
REMOVE(matrixAname,matrixBname,matrixCname)
Parameters
matrixAname
The name of input matrix A.
Type: NVARCHAR(ANY)
matrixBname
The name of input matrix B, containing the indexes of elements to be removed from matrix A.
matrixCname
The name of output matrix C, a row vector of matrix A with removed elements.
Type: NVARCHAR(ANY)
Returns
BOOLEAN TRUE, if successful.

Details

If matrices A and B, specified by the parameters, are considered row vectors, the second matrix indicates which elements of the first matrix are to be removed. The output is a row vector. Matrix C must not exist prior to the operation.

Examples

CALL nzm..shape('21,32,13,34,55,56,27,68,79',3,3,'A');
CALL nzm..shape('1,15,5,7',2,2,'B');
CALL nzm..remove('A','B','C');
CALL nzm..print('A');
CALL nzm..print('B');
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)

 REMOVE
--------
 t
(1 row)

                     PRINT
--------------------------------------------------
 -- matrix: A --
 21, 32, 13
 34, 55, 56
 27, 68, 79
(1 row)

           PRINT
----------------------------
 -- matrix: B --
 1, 15
 5, 7
(1 row)

                 PRINT
----------------------------------------
 -- matrix: C --
 32, 13, 34, 56, 68, 79
(1 row)

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

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

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