Returns a diagonal matrix
diagonal(v)
Returns a square matrix with the elements of vector v on the diagonal and all other elements zero.