Number of array dimensions(Quaternion and octonion overloadings of standard MATLAB® function)
Y = ndims(X)
ndims(X) returns the number of dimensions of the array X.
>> ndims(randq(3,2,2)) ans = 3
License terms.