Section: Array Generation and Manipulations
y = triu(x)
where x is a square matrix. This returns the upper triangular matrix (i.e.: all elements on or below the diagonal are set to 0). You can also specify a different diagonal using the alternate form
y = triu(x,n)
where n is the diagonal offset. In this mode, the diagonal specified is not set to zero in the returned matrix (e.g.: tril(x) and tril(x,1)) will return the same value.