linalg(deprecated)
randvector
random vector generator
Calling Sequence
Parameters
Description
Examples
randvector(n, entries=p)
n
-
positive integer
entries=p
(optional) p is a procedure which generates the entries
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.
with⁡linalg:
randvector⁡3
−722−55
poly := proc() Randpoly(3, x) mod 3 end proc:
randvector⁡2,entries=poly
x3+x2+2⁢x+1x3+2⁢x2
See Also
linalg(deprecated)[randmatrix]
linalg(deprecated)[vector]
LinearAlgebra
Vector
Download Help Document