Read about the function size. If A is your matrix, size give you the dimensions.
[m,n] = size(A) ; % m -rows, n - columns
[m,n,p] = size(A) ; %m- rows, n - columns, p - third diemsnion.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!