linalg(deprecated)
matadd
matrix or vector addition
Calling Sequence
Parameters
Description
Examples
matadd(A, B)
matadd(A, B, c1, c2)
A, B
-
matrices or vectors (with consistent dimensions)
c1, c2
(optional) scalar parameters
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 c1A+c2B.
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.
withlinalg:
A≔matrix3,3,1,2,3,2,3,4,3,4,5
A≔123234345
B≔array1..3,1..3,identity
B≔100010001
mataddA,B,1,10
112321343415
v≔vector3,2,3,4
v≔234
u≔vector3,−3,1,−5
u≔−31−5
mataddu,v,−2,1
8114
mataddtransposeu,transposev
transpose−14−1
See Also
LinearAlgebra
Download Help Document