linalg(deprecated)

 matrix or vector addition

 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 $\mathrm{c1}A+\mathrm{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.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $A≔\mathrm{matrix}\left(3,3,\left[1,2,3,2,3,4,3,4,5\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {2}& {3}& {4}\\ {3}& {4}& {5}\end{array}\right]$ (1)
 > $B≔\mathrm{array}\left(1..3,1..3,\mathrm{identity}\right)$
 ${B}{≔}\left[\begin{array}{ccc}{1}& {0}& {0}\\ {0}& {1}& {0}\\ {0}& {0}& {1}\end{array}\right]$ (2)
 > $\mathrm{matadd}\left(A,B,1,10\right)$
 $\left[\begin{array}{ccc}{11}& {2}& {3}\\ {2}& {13}& {4}\\ {3}& {4}& {15}\end{array}\right]$ (3)
 > $v≔\mathrm{vector}\left(3,\left[2,3,4\right]\right)$
 ${v}{≔}\left[\begin{array}{ccc}{2}& {3}& {4}\end{array}\right]$ (4)
 > $u≔\mathrm{vector}\left(3,\left[-3,1,-5\right]\right)$
 ${u}{≔}\left[\begin{array}{ccc}{-3}& {1}& {-5}\end{array}\right]$ (5)
 > $\mathrm{matadd}\left(u,v,-2,1\right)$
 $\left[\begin{array}{ccc}{8}& {1}& {14}\end{array}\right]$ (6)
 > $\mathrm{matadd}\left(\mathrm{transpose}\left(u\right),\mathrm{transpose}\left(v\right)\right)$
 ${\mathrm{transpose}}{}\left(\left[\begin{array}{ccc}{-1}& {4}& {-1}\end{array}\right]\right)$ (7)
{"ft_lang_label":"__label__en","ft_lang_prob":0.63426167,"math_prob":0.9998543,"size":1274,"snap":"2019-35-2019-39","text_gpt3_token_len":415,"char_repetition_ratio":0.114173226,"word_repetition_ratio":0.01183432,"special_character_ratio":0.26687598,"punctuation_ratio":0.19202898,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9994143,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-20T08:09:06Z\",\"WARC-Record-ID\":\"<urn:uuid:7f2ff47c-cc6f-4d3d-b114-801dca5891a4>\",\"Content-Length\":\"189558\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:17663394-c7a9-4bbc-baad-733a71a5c836>\",\"WARC-Concurrent-To\":\"<urn:uuid:b73e6cac-a49c-436f-aac1-0f13df45fafa>\",\"WARC-IP-Address\":\"199.71.183.28\",\"WARC-Target-URI\":\"https://de.maplesoft.com/support/help/maplesim/view.aspx?path=linalg(deprecated)%2Fmatadd\",\"WARC-Payload-Digest\":\"sha1:BSTUBMMWLJ5UQNJCCSW7UCBQZKU23TTC\",\"WARC-Block-Digest\":\"sha1:G3TEJZJ2UNVD73OYF5ATOQPU4FRFXRHE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514573908.70_warc_CC-MAIN-20190920071824-20190920093824-00286.warc.gz\"}"}