|
7.5.13.0. isUpperTriangular
Procedure from library ncpreim.lib (see ncpreim_lib).
- Usage:
- isUpperTriangular(M[,k]); M a matrix, k an optional int
- Return:
- int, 1 if the given matrix is upper triangular,
0 otherwise.
- Note:
- If k<>0 is given, it is checked whether M is strictly upper
triangular.
Example:
| LIB "ncpreim.lib";
ring r = 0,x,dp;
matrix M[2][3] =
0,1,2,
0,0,3;
isUpperTriangular(M);
==> 1
isUpperTriangular(M,1);
==> 1
M[2,2] = 4;
isUpperTriangular(M);
==> 1
isUpperTriangular(M,1);
==> 0
|
|