34.7 DimensionsMat

DimensionsMat( mat )

DimensionsMat returns the dimensions of the matrix mat as a list of two integers. The first entry is the number of rows of mat, the second entry is the number of columns.

    gap> DimensionsMat( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );
    [ 2, 3 ]
    gap> DimensionsMat( [ [ 1 .. 5 ] ] );
    [ 1, 5 ] 

Previous Up Top Next
Index

GAP 3.4.4
April 1997