extract_diag

STD.BLAS.extract_diag ( m.n.x);

mNumber of rows
nNumber of columns
xThe 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);