Cody

Problem 42524. Xor of matrix

Solution 2068643

Submitted on 24 Dec 2019 by Martin C.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
a=[1 2 5]; b=[6 4 3]; y_correct = [1 2 3 4 5 6]; assert(isequal(array_xor(a,b),y_correct))

b1 = 1×3 logical array 0 0 0 b2 = 1×3 logical array 0 0 0 y = 1 2 3 4 5 6

2   Pass
a=[1 2 5 4]; b=[8 6 9 2]; y_correct = [1 4 5 6 8 9]; assert(isequal(array_xor(a,b),y_correct))

b1 = 1×4 logical array 0 1 0 0 b2 = 1×4 logical array 0 0 0 1 y = 1 4 5 6 8 9

Suggested Problems

More from this Author18

Community Treasure Hunt

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

Start Hunting!