powered by
This function simply assigns value to diagonal of x and returns x.
value
x
set_diag(x, value)
a square matrix.
a value or a vector (recycled to the required length).