T = triu(M)
T = triu(M, k)
| Parameter | Description |
|---|---|
| M | 2D input matrix |
| k | Diagonals to include: integer real value |
| Parameter | Description |
|---|---|
| R | Upper Triangular Portions of Matrix |
triu computes Upper Triangular Portions of Matrix.
R = triu(M, k) returns the elements on and above the kth diagonal of M.
x = [1+i,-i;i,2i];
r = triu(x)
| Version | Description |
|---|---|
| 1.0.0 | initial version |