triuUpper triangular part of a matrix
triu(X)X should be a numeric matrix, i.e., ndims(X) equal to 2.X, i.e., elements above or on the main diagonal of X.X is a character array, elements below the main diagonal are filled with the white-space characters.X is empty.triu(X, k)k should be an integer scalar, not equal to NaN nor Inf.k < 0, it returns elements above or on the k-th lower diagonal of X.k > 0, it returns elements above or on the k-th upper diagonal of X.k == 0, it returns the same result as triu(X).triu() extracts the upper triangular part of a character array. The lower part is filled with spaces.a=['abcd';'efgh';'ijkl';'mnop']
triu(a)
a =
abcd
efgh
ijkl
mnop
ans =
abcd
fgh
kl
p