size(m,k)

The size(m) function returns the number of elements in the kth dimension.

Example

OML

m=[1 2 3;4 5 6]

1 2 3

4 5 6

>> size(m,1)

2

>> size(m,2)

3