  diag
  Builtin Function



      SSyynnooppssiiss
        Diagnonal matrix.

      SSyynnttaaxx
        diag ( _A )

        diag ( _A, _K )

      DDeessccrriippttiioonn
        If the 1st argument, _A is a 1xN matrix construct a diagonal
        matrix from the input. Optionally if _K (scalar) is specified
        then create a matrix with the vector as the _Kth diagonal.

        If the 1st argument is a MxN matrix, construct a 1xN matrix from
        the diagonal elements of the input matrix. Optionally if _K is
        specified return the vector from the _Kth diagonal of the input
        matrix.


          _K < is below the main diagonal.



          _K > is above the main diagonal.



     SSeeee AAllssoo
        tril, triu
































