📜  r 矩阵是对称的 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:23.297000             🧑  作者: Mango

代码示例1
Z = matrix(c(3,1,4, 1,6,5, 4,5,2), nrow=3, ncol=3)
Z 
>>>       [,1] [,2] [,3]
>>> [1,]    3    1    4
>>> [2,]    1    6    5
>>> [3,]    4    5    2

isSymmetric(Z)
>>> [1] TRUE