SCALAR_OPERATION - element wise scalar operation
This procedure implements elementwise scalar operations on a specified block of elements.
Usage
The SCALAR_OPERATION stored procedure has the following syntax:
- SCALAR_OPERATION(matrixIn,matrixOut,operator,value,row_start,col_start,row_stop,col_stop)
- Parameters
- matrixIn
- The name of the input matrix.
- matrixOut
- The name of the output matrix.
- operator
- The operator to use. Must be one of the following: + - * % ^ & |
- value
- The value.
- row_start
- The first row of the input matrix to use.
- col_start
- The first column of the input matrix to use.
- row_stop
- The last row of the input matrix to use.
- col_column
- The last column of the input matrix to use.
Examples
CALL nzm..shape('1,2,3,4,5,0,6,7,8',3,3,'A');
CALL nzm..scalar_operation('A','B','+',4, 2,2,3,3);
CALL nzm..print('A');
CALL nzm..print('B');
CALL nzm..delete_matrix('A');
CALL nzm..delete_matrix('B');
SHAPE
-------
t
(1 row)
SCALAR_OPERATION
------------------
t
(1 row)
PRINT
-----------------------------------------
-- matrix: A --
1, 2, 3
4, 5, 0
6, 7, 8
(1 row)
PRINT
-------------------------------------------
-- matrix: B --
1, 2, 3
4, 9, 4
6, 11, 12
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)