is.square.matrix {matrixcalc} | R Documentation |
The function returns TRUE of the argument is a square matrix and FALSE otherwise.
is.square.matrix(x)
x |
a matrix |
TRUE or FALSE
Frederick Novomestky fnovomes@poly.edu
A <- matrix( seq( 1, 12, 1 ), nrow=3, byrow=TRUE ) is.square.matrix( A ) B <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE ) is.square.matrix( B )