linalg[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
|
|
•
|
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 packages, LinearAlgebra and VectorCalculus, instead.
>
|
|
>
|
|
| (1) |
>
|
poly := proc() Randpoly(3, x) mod 3 end proc:
|
>
|
|
| (2) |
|
|
Download Help Document
Was this information helpful?