R/is.square.matrix.R

Defines functions is.square.matrix

Documented in is.square.matrix

is.square.matrix <- function( x )
{
###
### determines if the given matrix is a square matrix
###
### arguments
### x = a matrix object
###
    if ( !is.matrix( x ) )
        stop( "argument x is not a matrix" )
    return( nrow(x) == ncol(x) )
}

Try the matrixcalc package in your browser

Any scripts or data that you put into this service are public.

matrixcalc documentation built on July 28, 2021, 9:06 a.m.