Method on @infsup: M = diag (V)
Method on @infsup: V = diag (M)
Method on @infsup: M = diag (V, K)
Method on @infsup: M = diag (V, M, N)
Method on @infsup: V = diag (M, K)

Create a diagonal matrix M with vector V on diagonal K or extract a vector V from the K-th diagonal of matrix M.

With three arguments, create a matrix of size M×N.

diag (infsup (1 : 3))
  ⇒ ans = 3×3 interval matrix

       [1]   [0]   [0]
       [0]   [2]   [0]
       [0]   [0]   [3]

See also: @infsup/tril, @infsup/triu.

Package: interval