linalg(deprecated)/matadd - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


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

linalg(deprecated)

  

matadd

  

matrix or vector addition

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

matadd(A, B)

matadd(A, B, c1, c2)

Parameters

A, B

-

matrices or vectors (with consistent dimensions)

c1, c2

-

(optional) scalar parameters

Description

• 

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

  

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

• 

The function  matadd(A, B) computes the matrix (vector) sum of A and B.

• 

If the optional scalar parameters c1 and c2 are given, then matadd computes the matrix (vector) sum c1⁢A+c2⁢B.

• 

The evalm command is an easy method of accessing matadd.

• 

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

Examples

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

> 

with⁡linalg:

> 

A≔matrix⁡3,3,1,2,3,2,3,4,3,4,5

A≔123234345

(1)
> 

B≔array⁡1..3,1..3,identity

B≔100010001

(2)
> 

matadd⁡A,B,1,10

112321343415

(3)
> 

v≔vector⁡3,2,3,4

v≔234

(4)
> 

u≔vector⁡3,−3,1,−5

u≔−31−5

(5)
> 

matadd⁡u,v,−2,1

8114

(6)
> 

matadd⁡transpose⁡u,transpose⁡v

transpose⁡−14−1

(7)

See Also

LinearAlgebra