FUNCTION REFERENCE
triu
Upper triangular part.
Upper triangular part.
Syntax
triu(A)Syntax
triu(A, k)Keeps entries on and above diagonal k (default 0) and zeros the rest.
Example
triu([1 2; 3 4]) % [1 2; 0 4]Differences from MATLAB: Real 2-D arrays only.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.