Cody

# Problem 2592. LocateMembership | Membership of Matrix in another matrix

Solution 2114876

Submitted on 2 Feb 2020 by Asif Newaz
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))

### Community Treasure Hunt

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

Start Hunting!