Cody

Solution 1911038

Submitted on 24 Aug 2019
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 = magic(5); thresh = 4; [r,c]= find(magic(5) > 4) out = [r c] assert(isequal(RCgreaterThan(M, thresh),out))

r = 1 2 4 5 1 2 3 4 5 2 3 4 5 1 2 3 4 1 2 3 5 c = 1 1 1 1 2 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 out = 1 1 2 1 4 1 5 1 1 2 2 2 3 2 4 2 5 2 2 3 3 3 4 3 5 3 1 4 2 4 3 4 4 4 1 5 2 5 3 5 5 5 ans = 17 23 10 11 24 5 6 12 18 7 13 19 25 8 14 20 21 15 16 22 9

Output argument "out" (and maybe others) not assigned during call to "RCgreaterThan". Error in Test1 (line 7) assert(isequal(RCgreaterThan(M, thresh),out))

2   Fail
M = magic(6); thresh = 2; [r,c]= find(magic(6) > 2) out = [r c] assert(isequal(RCgreaterThan(M, thresh),out))

r = 1 2 3 4 5 6 2 3 4 5 6 1 2 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 c = 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 out = 1 1 2 1 3 1 4 1 5 1 6 1 2 2 3 2 4 2 5 2 6 2 1 3 2 3 4 3 5 3 6 3 1 4 2 4 3 4 4 4 5 4 6 4 1 5 2 5 3 5 4 5 5 5 6 5 1 6 2 6 3 6 4 6 5 6 6 6 ans = 35 3 31 8 30 4 32 9 28 5 36 6 7 33 34 29 26 21 22 17 12 13 19 23 27 10 14 18 24 25 20 15 16 11

Output argument "out" (and maybe others) not assigned during call to "RCgreaterThan". Error in Test2 (line 7) assert(isequal(RCgreaterThan(M, thresh),out))