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

1 view (last 30 days)
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]

Accepted Answer

James Tursa
James Tursa on 13 May 2016
X = mod(sum(A,2),2);

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!