diagonal
function diagonal(x:NumberScalarLike, n:Integer) -> NumberMatrixLike
Construct diagonal matrix, filling the diagonal with a given scalar.
- x Scalar to assign to diagonal.
- n Number of rows and columns.
Returns Diagonal matrix.
function diagonal(x:NumberScalarLike, n:Integer) -> NumberMatrixLike
Construct diagonal matrix, filling the diagonal with a given scalar.
Returns Diagonal matrix.