tril
description:
B = tril(A,k) extracts lower triangular part of A.
tril(A) is the lower triangular part of A.
tril(A,k) is the elements on and below the k-th diagonal of A. k = 0 is the main diagonal, k > 0 is above the main diagonal and k < 0 is below the main diagonal.
arguments:
A is a matrix of NCpolys
k is an integer
output:
matrix of NCpolys
possible usage:
tril(A), tril(A,k)
example:
>> A=[x x^2 x*y-y*x; y x*y 2*x-y; x+y y-x x^2+y^2]
A = x x^2 x*y-y*x
y x*y 2*x-y
x+y -x+y x^2+y^2
>> tril(A)
ans = x 0 0
y x*y 0
x+y -x+y x^2+y^2
>> tril(A,-1)
ans = 0 0 0
y 0 0
x+y -x+y 0