The DIMENSION function returns the dimensions of the x matrix. The total number of elements in a matrix is prod(dimension(x)).
The returned vector is a
vector. The first element is the number of rows in x, and the second element is the number of columns, as shown in the following example:
x = {1 2, 3 4, 5 6};
d = dimension(x);
print d;