check whether matrix is diagonal
is.diagonal(A, epsilon = 0)
A | symmetric matrix |
---|---|
epsilon | tolerance, default is 0. |
logical, TRUE/FALSE, TRUE for diagonal matrices
check whether matrix is diagonal
#> [,1] [,2] #> [1,] 0.6666667 -0.3333333 #> [2,] -0.3333333 0.6666667