DIAG – diagonal
Bei diesem Verfahren wird eine Diagonalmatrix aus den Diagonalelementen der Eingabematrix erstellt.
Verwendung
Die gespeicherte Prozedur DIAG hat die folgende Syntax:
- DIAG( matrixIn,matrixOut )
- Parameter
- matrixIn
- Der Name der Eingabematrix.
- matrixOut
- Der Name der Ausgabematrix.
Beispiele
CALL nzm..SHAPE('0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16',4,4 ,'A');
CALL nzm..DIAG('A', 'B');
CALL nzm..PRINT('A');
CALL nzm..PRINT('B');
CALL nzm..DELETE_MATRIX('A');
CALL nzm..DELETE_MATRIX('B');
SHAPE
-------
t
(1 row)
DIAG
------
t
(1 row)
PRINT
-------------------------------------------------------------------
-- matrix: A --0,1,2,3
4, 5, 6, 7
8, 9, 10, 11
12, 13, 14, 15
(1 row)
PRINT
---------------------------------------------------------------
-- matrix: B --
0, 0, 0, 0
0, 5, 0, 0
0, 0, 10, 0
0, 0, 0, 15
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)