m = {10, 20, 30}
nref = {1, 2, 3}
a = Table[m + n, {n, nref}] //生成矩阵
b = Table[a[[x, x]], {x, 1, 3, 1}] //获取a矩阵对角线元素
![](https://img.haomeiwen.com/i1881737/cde43c21e405c0b8.png)
m = {10, 20, 30}
nref = {1, 2, 3}
a = Table[m + n, {n, nref}] //生成矩阵
b = Table[a[[x, x]], {x, 1, 3, 1}] //获取a矩阵对角线元素
本文标题:mathematica取矩阵对角线元素
本文链接:https://www.haomeiwen.com/subject/iujrvqtx.html
网友评论