vector - Maple Help

type/vector

check for vector (one-dimensional array)

 Calling Sequence type(v, vector) type(v, 'vector'(K))

Parameters

 v - expression K - type of the coefficient field

Description

 • This function checks whether its first argument is a Maple vector. A vector is defined to be an one-dimensional array indexed from 1.
 • If the argument K is given, the function checks whether A is a vector with entries of type K .
 • Also, if K is given, it is essential to quote the word vector in order to avoid confusion with the vector function in the linalg package.
 • Note: The command vector has been superseded by Vector.

Examples

 > $\mathrm{type}\left(\mathrm{array}\left(1..3,\left[1,2,3\right]\right),\mathrm{vector}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{array}\left(0..2,\left[1,2,3\right]\right),\mathrm{vector}\right)$
 ${\mathrm{false}}$ (2)
 > $v≔\mathrm{array}\left(\left[2,\frac{2}{3},1\right]\right)$
 ${v}{≔}\left[\begin{array}{ccc}{2}& \frac{{2}}{{3}}& {1}\end{array}\right]$ (3)
 > $\mathrm{type}\left(v,'\mathrm{vector}'\left(\mathrm{integer}\right)\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(v,'\mathrm{vector}'\left(\mathrm{rational}\right)\right)$
 ${\mathrm{true}}$ (5)