Cody

Solution 1689698

Submitted on 10 Dec 2018 by William
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 3; 4 5 6; 7 8 9]; b = [5]; y_correct = [2,2]; assert(isequal(LocateMembership(a,b),y_correct))

2   Pass
a = [3 -7 5 4 3; 1 0 10 5 9;-2 1 -5 3 4; 7 6 4 1 2; 1 2 3 4 5]; b = [5 4 3; 10 5 9; -5 3 4]; y_correct = [2,4]; assert(isequal(LocateMembership(a,b),y_correct))

3   Pass
a = [-5 6 5 4 -5; 1 0 10 5 9; 5 4 -5 3 4; 10 5 9 1 2; -5 3 4 2 0]; b = [5 4 -5; 10 5 9; -5 3 4]; y_correct = [2,4;4,2]; assert(isequal(LocateMembership(a,b),y_correct))

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