Cody

Solution 2166038

Submitted on 19 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
assert(isequal(odd_idx([1, 2, 3;4, 5, 6;7, 8, 9]),[1, 3;7, 9]))

outMat = 1 7 5 3 9

Assertion failed.

2   Fail
assert(isequal(odd_idx([16 2 3 13;5 11 10 8;9 7 6 12;4 14 15 1]),[16, 3;9, 6]))

outMat = 16 9 2 7 3 6 13 12

Assertion failed.

3   Pass
assert(isequal(odd_idx(1), 1))

outMat = 1

4   Pass
assert(isequal(odd_idx([1 2]), 1))

outMat = 1

5   Pass
assert(isequal(odd_idx([1; 2]), 1))

outMat = 1

6   Pass
assert(isequal(odd_idx([7 3 4 7 2 9 4 9 5 8]), [7 4 2 4 5]))

outMat = 7 4 2 4 5

7   Pass
assert(isequal(odd_idx([5;2;8;6;6;10;4;9;6;7]),[5;8;6;4;6]))

outMat = 5 8 6 4 6

8   Fail
assert(isequal(odd_idx([2 4 4 2 2 1;4 2 2 5 2 4;4 2 2 1 2 1;2 3 5 5 1 1;3 4 2 5 5 1;3 5 3 1 4 1;5 2 2 5 5 2]), [2 4 2; 4 2 2; 3 2 5; 5 2 5]))

outMat = 2 4 3 5 2 3 5 4 2 2 2 5 5 1 2 2 5 5 4 1 1

Assertion failed.