array upper bound - Maple Help

upperbound - array upper bound

lowerbound - array lower bound

 Calling Sequence lowerbound(a, dim) lowerbound(a) upperbound(a, dim) upperbound(a)

Parameters

 a - rtable, array, list, set, or string dim - posint

Description

 • The lowerbound and upperbound commands return the lower or upper bounds of the specified dimension, dim, of the array or rtable, a.
 • The lowerbound of a list is always 1.  The upperbound of a list is the same as numelems('a').  A list-of-lists or other recursive list structure is considered a one-dimensional object.
 • If dim is not specified, all lower or upper bounds are returned as a sequence.

 • The upperbound and lowerbound commands are thread-safe as of Maple 15.

Examples

 > $M:=⟨⟨1|2|3⟩,⟨4|5|6⟩⟩$
 ${M}{:=}\left[\begin{array}{rrr}{1}& {2}& {3}\\ {4}& {5}& {6}\end{array}\right]$ (1)
 > $m,n:=\mathrm{upperbound}\left(M\right)$
 ${m}{,}{n}{:=}{2}{,}{3}$ (2)
 > $\mathrm{upperbound}\left(M,1\right)$
 ${2}$ (3)
 > $\mathrm{upperbound}\left(M,2\right)$
 ${3}$ (4)
 > $\mathrm{lowerbound}\left(M,1\right)$
 ${1}$ (5)
 > $\mathrm{upperbound}\left(\left[1,2,3\right]\right)$
 ${3}$ (6)
 > $\mathrm{upperbound}\left(\left[\left[1,2,3\right],\left[4,5,6\right]\right]\right)$
 ${2}$ (7)