linalg(deprecated)/randmatrix - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : linalg(deprecated)/randmatrix

linalg(deprecated)

  

randmatrix

  

random matrix generator

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

randmatrix(m, n, options)

Parameters

m, n

-

positive integers

options

-

(optional) names or equations

Description

• 

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

  

- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.

• 

The randmatrix function generates a random matrix of dimension m by n.  It is intended to be used for generating examples for debugging, testing, and demonstration purposes.  Several options are available.  The options determine the form of the matrix and the entries in the matrix.

• 

The first two arguments specify the row dimension and column dimension. The remaining arguments are interpreted as options and are input as equations or names in any order. The names sparse, dense (default), symmetric, antisymmetric, and unimodular specify the structure of the matrix.  The equation entries = f specifies that the nullary function f is to be used to generate the matrix entries.  The default is rand(-99..99).  Thus the matrix entries are random two digit integers.

• 

The command with(linalg,randmatrix) allows the use of the abbreviated form of this command.

Examples

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

withlinalg:

randmatrix3,3

−722−55−9487−560−6297

(1)

randmatrix3,3,unimodular

1−73−401−83001

(2)

poly := proc() Randpoly(3, x) mod 3 end proc;

polyprocRandpoly3,xmod3end proc

(3)

randmatrix2,2,entries=poly

x3+x2+2x+12x3+2x2+12x3+x+12x3+x2+x

(4)

See Also

linalg(deprecated)[matrix]

LinearAlgebra

LinearAlgebra[RandomMatrix]

Matrix