Mathematica
Matlab
Maple
restart; A:=Matrix([[1,2,3],[4,5,6],[7,8,9]]); d:=MTM:-diag(A); mul(x,x in d); #or simpler is restart; A:=Matrix([[1,2,3],[4,5,6],[7,8,9]]); mul(LinearAlgebra:-Diagonal(A));
|
45 |