Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ndims

MATLAB ndims function


Description

Provides number of array dimensions.

Usage

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)

See Also

Examples

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

matlab

MATLAB emulation package

v1.0.2
Artistic-2.0
Authors
P. Roebuck
Initial release
2014-06-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.