tril

Lower triangular part of matrix

Syntax

  • T = tril(M)

  • T = tril(M, k)

Input argument

  • M - 2D input matrix

  • k - Diagonals to include: integer real value

Output argument

  • R - Lower Triangular Portions of Matrix

Description

tril computes Lower Triangular Portions of Matrix.

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

Example

x = [1+i,-i;i,2i];
r = tril(x)

See also

diag, triu.

History

Version
Description

1.0.0

initial version

Author

Allan CORNET

Last updated