api / koma / diag

diag

fun diag(arr:Matrix<Double>):Matrix<Double>

Extracts the diagonal of the matrix.

Parameters

arr - An arbitrarily sized matrix

Return a Nx1 column vector.