SET_VALUE
This procedure sets the value of a specified matrix element.
Usage
The SET_VALUE stored procedure has the following syntax:
- SET_VALUE(mat_name,inrow,incl,inval)
- Parameters
- mat_name
- The name of the matrix.
- inrow
- The row index of the element.
- incol
- The column index of the element.
- inval
- The value for the matrix element.
Details
This procedure is more efficient when the number of values is relatively small. For setting large numbers of values, use alternate approaches that process data in bulk.
Examples
call nzm..shape('1,2,3,4,5,0,6,7,8',3,3,'A');
call nzm..set_value('A', 1, 1, 878);
call nzm..print('A');
call nzm..delete_matrix('A');
SHAPE
-------
t
(1 row)
SET_VALUE
----------
t
(1 row)
PRINT
-------------------------------------------
-- matrix: A --
878, 2, 3
4, 5, 0
6, 7, 8
(1 row)
DELETE_MATRIX
---------------
t
(1 row)