Given the folowing 2D matrix \(A\) find the sum of each row
\[ \begin {pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end {pmatrix} \]
A:=Matrix([[1,2,3],[4,5,6],[7,8,9]]); map(x->add(x),convert(A,listlist)) #or may be better is `add`~([LinearAlgebra:-Row(A,[1..-1])])
|
[6, 15, 24] |