MAX - elementwise maximum, elementwise logical OR
This procedure implements an elementwise computation of C := max(A,B), where A, B, and C are matrices.
Usage
The MAX stored procedure has the following syntax:
- MAX(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 "OR"). 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..MAX('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)
MAX
-----
t
(1 row)
PRINT
-----------------------------------------
-- matrix: C --
9, 8, 7
6, 5, 6
7, 8, 9
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)