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 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.
with⁡linalg:
A≔matrix⁡3,3,1,2,3,2,3,4,3,4,5
A≔123234345
B≔array⁡1..3,1..3,identity
B≔100010001
matadd⁡A,B,1,10
112321343415
v≔vector⁡3,2,3,4
v≔234
u≔vector⁡3,−3,1,−5
u≔−31−5
matadd⁡u,v,−2,1
8114
matadd⁡transpose⁡u,transpose⁡v
transpose⁡−14−1
See Also
LinearAlgebra
Download Help Document