Numerical Matrix operations



Hi,

So i have been doing alot of Maxima programming lately :-)

There are couple questions i have.

1) Is there a easy command to figure out the dimension of a matrix?
  For now i have to do length(M) to get the row number and  
length(transpose(M)) to get the column number of matrix M.
   Of course i can always write a function do combine the operations  
above:-)


2) When I declear a matrix of either 1xn or nx1. Let's call that matrix  
M.  so in matlab, i can just think of M as a vector.
Meaning it doesn't matter if the matrix is 1xn or nx1 when i do M[2] it  
will return the same element.  However, in maxima i have to explicitly do
either M[2,1] or M[1,2] depending on the dimension of the matrix.  Is  
there a way for maxima to do what matlab is doing?


3) When i call row(M,1), maxima returns a matrix back. can i make it so  
that it returns an array?


4) Is there a struct type in maxima? somthing like
Input:
a.one=1,
a.two=2,
outout:
a
   one=1
   two=2


5) Can i do object oriented programming in maxima? (creating classes)

- Kun