Dimensions of a Matrix

rows(A) Returns the number of rows in A.

cols(A) Returns the number of columns in A.

Arguments:

If A is neither a vector or a matrix, both rows and cols return zero.