Question: getting the number of rows and columns of a Matrix

I'm using the LinearAlgebra package and the Matrix() command to build matrices in Maple 9.5. I need to be able to find the number of rows and the number of columns of a certain matrix A. I ran into problems running nops(A[1,1..-1]) and discovered that if I find the operands of a 3x2 matrix "wem" I am returned this: 3, 2, {(1, 1) = 0.7, (1, 2) = 0.1, (2, 1) = 0.2, (2, 2) = 0.3, (3, 1) = 0.1, (3, 2) = 0.6}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [] I then realized that the first operand is the number of rows and the 2nd operand is the number of columns. There seems to be some nested lists. So I then can do op([1,1],A) to retrieve the number of rows (3) and I can do op([1,2],A) to retrieve the number of columns (2). My thoughts are that there must be a simpler way of doing this. Will this be consistent from version to version? I need to run this with Maple 9, as well. I'm teaching myself the program from square one for a senior project, so I don't always see the obvious things. So please, if there is an easier, simpler, or just a different way of returning the number of rows and columns, please share! Thanks!
Please Wait...