ndims
Returns the number of dimensions of an array.
Syntax
R = ndims(A)
Inputs
- A
 - Any valid matrix.
 
Outputs
- R
 - An integer value, the number of dimensions of the array.
 
Examples
Matrix
        input:
      R = ndims([1,3,2;5,2,3])R = 2Complex matrix
        input:
    R = ndims([1;7+9i;2i-1])R = 2Comments
ndims(A) is equivalent to length(size(A)).