MIN - elementwise minimum, elementwise logical AND
This procedure implements an elementwise computation of C := min(A,B), where A, B, and C are matrices.
Usage
The MIN stored procedure has the following syntax:
- MIN(matrixAname,matrixBname,matrixCname)
- Parameters
- matrixAname
- The name of input matrix A.
- matrixBname
- The name of input matrix B.
- matrixCname
- The name of output matrix C.
Details
If matrices A and B are logical matrices consisting of zeros (0) as FALSE and ones (1) as TRUE, then C := A | B (elementwise "AND"). Matrices A and B must have the same dimensions, that is, the same number of rows and columns. Matrix C is given the same shape. Matrix C must not exist prior to the operation.
Examples
CALL nzm..SHAPE('1,2,3,4,5,6,7,8,9',3,3,'A');
CALL nzm..SHAPE('9,8,7,6,5,4,3,2,1',3,3,'B');
CALL nzm..MIN('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)
MIN
-----
t
(1 row)
PRINT
-----------------------------------------
-- matrix: C --
1, 2, 3
4, 5, 4
3, 2, 1
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)