Cody

Solution 2232867

Submitted on 24 Apr 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 = magic(5) LB = 3; UB = 10; AI = find((M > LB) & (M < UB)); assert(isequal(absoluteInBetween(M, LB, UB),AI))

M = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9 AI = 1×25 logical array 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1

Assertion failed.

2   Fail
M = magic(10) LB = 3; UB = 10; AI = find((M > LB) & (M < UB)); assert(isequal(absoluteInBetween(M, LB, UB),AI))

M = 92 99 1 8 15 67 74 51 58 40 98 80 7 14 16 73 55 57 64 41 4 81 88 20 22 54 56 63 70 47 85 87 19 21 3 60 62 69 71 28 86 93 25 2 9 61 68 75 52 34 17 24 76 83 90 42 49 26 33 65 23 5 82 89 91 48 30 32 39 66 79 6 13 95 97 29 31 38 45 72 10 12 94 96 78 35 37 44 46 53 11 18 100 77 84 36 43 50 27 59 AI = 1×100 logical array Columns 1 through 44 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 45 through 88 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 89 through 100 0 0 0 0 0 0 0 0 0 0 0 0

Assertion failed.