SCALE - scale the elements of a matrix
This procedure computes C = A f, where A and C are matrices and f is a real number.
Usage
The SCALE stored procedure has the following syntax:
- SCALE(matrixA,factor,matrixC)
- Parameters
- matrixA
- The name of input matrix A.
- factor
- The multiplication factor.
- matrixC
- The name of matrix C.
Examples
call nzm..shape('1,2,3,4,5,0,6,7,8',3,3,'A');
call nzm..scale('A','5','B');
call nzm..print('A');
call nzm..print('B');
call nzm..delete_matrix('A');
call nzm..delete_matrix('B');
SHAPE
-------
t
(1 row)
SCALE
-------
t
(1 row)
PRINT
-----------------------------------------
-- matrix: A --
1, 2, 3
4, 5, 0
6, 7, 8
(1 row)
PRINT
------------------------------------------------
-- matrix: B --
5, 10, 15
20, 25, 0
30, 35, 40
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)