linalg(deprecated)/genmatrix - 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)/genmatrix

linalg(deprecated)

  

geneqns

  

generate equations from the coefficient matrix

  

genmatrix

  

generate the coefficient matrix from equations

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

geneqns(A, x)

geneqns(A, x, b)

genmatrix(eqns, vars)

genmatrix(eqns, vars, flag)

genmatrix(eqns, vars, b)

Parameters

A

-

coefficient matrix

x

-

name or list of names for the unknowns

b

-

(optional) right hand side vector

eqns

-

set or list of equations

vars

-

set or list of variables

flag

-

(optional) the name ``flag''

Description

• 

Important: The linalg package has been deprecated. Use the superseding commands, LinearAlgebra[GenerateMatrix] and LinearAlgebra[GenerateEquations], instead.

  

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

• 

The function geneqns generates a set of linear equations from a coefficient matrix A in the variables xi. If an optional third argument the ``right-hand side'' vector b is present, it will be included in the equations. Otherwise the equations will be equated to zero.

• 

The function genmatrix generates the coefficient matrix from the linear system of equations eqns in the unknowns vars. If the optional third argument ``flag'' is present, the ``right-hand side'' vector will be included as the last column of the matrix. Otherwise an optional third argument will be assigned the ``right-hand side'' vector.

• 

These functions are part of the linalg package, and so can be used in the form geneqns(..) and genmatrix(..) only after performing the command with(linalg) or with(linalg,geneqns) and with(linalg,genmatrix). These functions can always be accessed in the long form linalg[geneqns](..) or linalg[genmatrix](..).

Examples

Important: The linalg package has been deprecated. Use the superseding commands, LinearAlgebra[GenerateMatrix] and LinearAlgebra[GenerateEquations], instead.

withlinalg:

eqnsx+2y=0,3x5y=0

eqnsx+2y=0,3x5y=0

(1)

Agenmatrixeqns,x,y

A123−5

(2)

geneqnsA,x,y

x+2y=0,3x5y=0

(3)

geneqnsA,x

x1+2x2=0,3x15x2=0

(4)

eqnsx+2z=a,3x5y=6z

eqnsx+2z=a,3x5y=6z

(5)

Agenmatrixeqns,x,y,z,flag

A102a3−516

(6)

Agenmatrixeqns,x,y,z,b

A1023−51

(7)

printb

a6

(8)

geneqnsA,x,y,z,b

x+2z=a,5y+z+3x=6

(9)

See Also

linalg(deprecated)[linsolve]

LinearAlgebra