triu
Upper triangular part of matrix
📝Syntax
T = triu(M)
T = triu(M, k)
📥Input Arguments
Parameter Description
M 2D input matrix
k Diagonals to include: integer real value
📤Output Arguments
Parameter Description
R Upper Triangular Portions of Matrix
📄Description

triu computes Upper Triangular Portions of Matrix.

R = triu(M, k) returns the elements on and above the kth diagonal of M.

💡Examples
x = [1+i,-i;i,2i];
r = triu(x)
🔗See Also
diag
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub