ArrayDims - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

ArrayDims

return the bounds of each dimension of an Array

ArrayNumDims

return the number of dimensions of an Array

 Calling Sequence ArrayDims(A) ArrayNumDims(A)

Parameters

 A - Array

Description

 • The ArrayDims(A) function returns a sequence of integer ranges representing the bounds of each dimension of Array A.
 This function is equivalent to op(2, A).
 • The ArrayNumDims(A) function returns the number of dimensions of Array A.
 This function is equivalent to nops([ArrayDims(A)]).
 • These functions cannot be used on Matrices or Vectors.

Examples

 > $A≔\mathrm{Array}\left(\left[\left[1,2,3\right],\left[4,5,6\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{rrr}{1}& {2}& {3}\\ {4}& {5}& {6}\end{array}\right]$ (1)

ArrayDims returns the bounds of each dimension of an Array:

 > $\mathrm{ArrayDims}\left(A\right)$
 ${1}{..}{2}{,}{1}{..}{3}$ (2)

The upperbound command returns the upper bound for each dimension:

 > $\mathrm{upperbound}\left(A\right)$
 ${2}{,}{3}$ (3)

ArrayNumDims returns the number of dimensions of an Array:

 > $\mathrm{ArrayNumDims}\left(A\right)$
 ${2}$ (4)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam