DIAGONAL(x;b)
form a diagonal matrix from a variate x
, or takes diagonal of a square, symmetric or diagonal matrix x
; b
may be set if x
is a matrix, to request a banded diagonal matrix of order b
(returned as a square matrix with the values off the bands set to zero).
DIAGONAL
Updated on December 4, 2017