up previous next
IsDiagonal

checks if a matrix is diagonal

Syntax
IsDiagonal(M: MAT): BOOL

Description
This function tests whether the square matrix M is diagonal.

Example
/**/  M := mat([[0, 1, 2],[-1, 0, 3],[-2, -3, 0]]);
/**/  IsDiagonal(M);
false

See Also