STD.BLAS.extract_diag ( m.n.x);
m | Number of rows |
n | Number of columns |
x | The matrix from which to extract the diagonal |
Return: | Diagonal matrix |
The extract_diag function extracts the diagonal of he matrix
Example:
IMPORT STD; STD.BLAS.Types.matrix_t x := [1.0, 2.0, 3.0, 2.0, 2.0, 2.0, 4.0, 4.0, 4.0]; diagonal_only := := STD.BLAS.extract_diag(3, 3, x);