how to XOR binary matrix

1 次查看(过去 30 天)
hi ... how to XOR bianry matrix as : [0 1 0 1 1 1 0 0 1 0 1 1] in away that Xoring tow digits together then xor the result with the third bit,,, and do this for the rest of the matrix. And save the result as matrix. starting from right to left.
please help needed.

采纳的回答

Walter Roberson
Walter Roberson 2017-6-2
final_xor_result = mod( sum(YourVector), 2 )
That is, if there are an even number of 1 bits, then the result of the xor is false, and if there are an odd number of 1 bits, then the result of the xor is true. You do not need to do the xor explicitly, just count the bits that are on.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by