ndims: MATLAB ndims function

View source: R/ndims.R

ndimsR Documentation

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)

P. Roebuck proebuck1701@gmail.com

See Also

size

Examples

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

matlab documentation built on July 1, 2024, 5:07 p.m.