diagonal

fun diagonal(vararg data: Double): Matrix

Creates a matrix with data along the diagonal and all other elements set to 0.