linalg(deprecated)
vectdim
determine the dimension of a vector
Calling Sequence
Parameters
Description
Examples
vectdim(v)
vectdim(L)
v
-
vector
L
list
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.
with⁡linalg:
v≔vector⁡x,y,z
v≔xyz
vectdim⁡v
3
vectdim⁡1,2,3,4
4
u≔vector⁡2
u≔`?`1`?`2
vectdim⁡u
2
See Also
linalg(deprecated)[coldim]
linalg(deprecated)[rowdim]
LinearAlgebra
Download Help Document