Cody

Solution 2167156

Submitted on 20 Mar 2020
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   Fail
m = [3 1 5 0 0 3 4 1 5 0 4 2 1 5 0]; srows = [3 1 5 0 0;4 2 1 5 0]; assert(isequal(findsimilar(m),srows))

m = 3 1 5 NaN NaN 3 4 1 5 NaN 4 2 1 5 NaN s = 3 1 5 NaN NaN ans = 3 1 5 NaN NaN ans = 3 4 1 5 NaN ans = 4 2 1 5 NaN

Output argument "rows" (and maybe others) not assigned during call to "findsimilar". Error in Test1 (line 5) assert(isequal(findsimilar(m),srows))

2   Fail
m = [3 1 5 0 0 1 2 5 0 0 1 3 4 1 5 2 1 5 0 0]; srows = [3 1 5 0 0; 2 1 5 0 0]; assert(isequal(findsimilar(m),srows))

m = 3 1 5 NaN NaN 1 2 5 NaN NaN 1 3 4 1 5 2 1 5 NaN NaN s = 3 1 5 NaN NaN ans = 3 1 5 NaN NaN ans = 1 2 5 NaN NaN ans = 1 3 4 1 5 ans = 2 1 5 NaN NaN

Output argument "rows" (and maybe others) not assigned during call to "findsimilar". Error in Test2 (line 6) assert(isequal(findsimilar(m),srows))

3   Fail
m = [3 1 5 7 0 3 2 5 7 0 3 5 7 2 0 1 5 7 2 0 4 6 7 8 9 4 5 7 8 0 4 5 6 7 8]; srows = [3 1 5 7 0;1 5 7 2 0;4 6 7 8 9;4 5 7 8 0]; assert(isequal(findsimilar(m),srows))

m = 3 1 5 7 NaN 3 2 5 7 NaN 3 5 7 2 NaN 1 5 7 2 NaN 4 6 7 8 9 4 5 7 8 NaN 4 5 6 7 8 s = 3 1 5 7 NaN ans = 3 1 5 7 NaN ans = 3 2 5 7 NaN ans = 3 5 7 2 NaN ans = 1 5 7 2 NaN ans = 4 6 7 8 9 ans = 4 5 7 8 NaN ans = 4 5 6 7 8

Output argument "rows" (and maybe others) not assigned during call to "findsimilar". Error in Test3 (line 9) assert(isequal(findsimilar(m),srows))

4   Fail
m = [3 1 5 0 0 3 1 6 0 0 3 2 6 0 0 2 1 5 6 0]; srows = m; assert(isequal(findsimilar(m), srows))

m = 3 1 5 NaN NaN 3 1 6 NaN NaN 3 2 6 NaN NaN 2 1 5 6 NaN s = 3 1 5 NaN NaN ans = 3 1 5 NaN NaN ans = 3 1 6 NaN NaN ans = 3 2 6 NaN NaN ans = 2 1 5 6 NaN

Output argument "rows" (and maybe others) not assigned during call to "findsimilar". Error in Test4 (line 6) assert(isequal(findsimilar(m), srows))