Hi,, I am trying to do the below problem. Any kind of help would be appreciated.TIA

25 次查看(过去 30 天)
My matrix is A=[1 1 0 1 ; 1 0 0 1; 1 0 1 0]
I will have to XOR the elements in the row so that it gives the result [1; 0; 0]

采纳的回答

James Tursa
James Tursa 2016-5-13
X = mod(sum(A,2),2);

更多回答(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