ndims: MATLAB ndims function

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Provides number of array dimensions.

Usage

1
ndims(A)

Arguments

A

object of which to determine the number of dimensions

Details

Simply invokes length(size(A)).

Value

Returns the number of dimensions in the array A.

Note

The number of dimensions is always greater than or equal to 2. Initial implementation returned length.

Author(s)

P. Roebuck proebuck@mdanderson.org

See Also

size

Examples

1
2
3
ndims(2:9)			# 2
ndims(magic(4))			# 2
ndims(array(1:8, c(2,2,2)))	# 3


Search within the matlab package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.