DIAGONAL(x;b) form a diagonal matrix from a variate
x, or takes diagonal of a square, symmetric or diagonal matrix
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).
Updated on December 4, 2017