linalg(deprecated)/vectdim - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Home : Support : Online Help : linalg(deprecated)/vectdim

linalg(deprecated)

 vectdim
 determine the dimension of a vector

 Calling Sequence vectdim(v) vectdim(L)

Parameters

 v - vector L - list

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Dimension], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function vectdim determines the dimension of the given vector.
 • If vectdim is given a vector v, then the dimension of (number of elements in) v is returned; if a list L is given to vectdim, then the number of elements in the list is returned.
 • The command with(linalg,vectdim) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Dimension], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $v≔\mathrm{vector}\left(\left[x,y,z\right]\right)$
 ${v}{≔}\left[\begin{array}{ccc}{x}& {y}& {z}\end{array}\right]$ (1)
 > $\mathrm{vectdim}\left(v\right)$
 ${3}$ (2)
 > $\mathrm{vectdim}\left(\left[1,2,3,4\right]\right)$
 ${4}$ (3)
 > $u≔\mathrm{vector}\left(2\right)$
 ${u}{≔}\left[\begin{array}{cc}{{\mathrm{?}}}_{{1}}& {{\mathrm{?}}}_{{2}}\end{array}\right]$ (4)
 > $\mathrm{vectdim}\left(u\right)$
 ${2}$ (5)