| ndims {matlab} | R Documentation |
Provides number of array dimensions.
ndims(A)
A |
object of which to determine the number of dimensions |
Simply invokes length(size(A)).
Returns the number of dimensions in the array A.
The number of dimensions is always greater than or equal to 2.
Initial implementation returned length.
P. Roebuck roebuck@mdanderson.org
ndims(2:9) # 2 ndims(magic(4)) # 2 ndims(array(1:8, c(2,2,2))) # 3