linalg(deprecated)/randvector - Maple Help

linalg(deprecated)

 randvector
 random vector generator

 Calling Sequence randvector(n, entries=p)

Parameters

 n - positive integer entries=p - (optional) p is a procedure which generates the entries

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[RandomVector], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The randvector function generates a random vector of dimension n.  It is intended to be used for generating examples for debugging, testing, and demonstration purposes.
 • The equation entries=p specifies that the nullary function p is to be used to generate the vector entries.  The default is rand(-99..99).  Thus the vector entries are random two-digit integers.
 • The command with(linalg,randvector) allows the use of the abbreviated form of this command.

Examples

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

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $\mathrm{randvector}\left(3\right)$
 $\left[\begin{array}{ccc}{-7}& {22}& {-55}\end{array}\right]$ (1)
 > poly := proc() Randpoly(3, x) mod 3 end proc:
 > $\mathrm{randvector}\left(2,\mathrm{entries}=\mathrm{poly}\right)$
 $\left[\begin{array}{cc}{{x}}^{{3}}{+}{{x}}^{{2}}{+}{2}{}{x}{+}{1}& {{x}}^{{3}}{+}{2}{}{{x}}^{{2}}\end{array}\right]$ (2)