DIVIDE_ELEMENTS - divide matrices element-by-element
This procedure computes matrix C using element-by-element division of matrix A by matrix B: Ci = Aij/Bij.
Usage
The DIVIDE_ELEMENTS stored procedure has the following syntax:
- DIVIDE_ELEMENTS(matrixA,matrixB,matrixC)
- Parameters
- matrixA
- The name of input matrix A.
- matrixB
- The name of input matrix B.
- matrixC
- The name of output matrix C.
Examples
CALL nzm..SHAPE('1,4,9,16,25,36,49,64,81',3,3,'A');
CALL nzm..SHAPE('1,2,3,4,5,6,7,8,9',3,3,'B');
CALL nzm..DIVIDE_ELEMENTS('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)
DIVIDE_ELEMENTS
-----------------
t
(1 row)
PRINT
-----------------------------------------
-- matrix: C --
1, 2, 3
4, 5, 6
7, 8, 9
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)