更新时间:2023-02-26 15:55:03
这里很短
value = A(sum(bsxfun(@eq, A(:), A(:).'))==1);
它比较矩阵中的所有成对元素,并计算它们相等的次数,并返回仅计数一次的元素.
It compares all pairs of elements in the matrix and counts how many times they are equal and returns the ones that have been counted only once.