Cody

Solution 2050444

Submitted on 8 Dec 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
x1 = 1; x2 = 5; y_correct = [1:5]; assert(isequal(interleaved_idx(x1,x2),y_correct) && isempty(regexp(evalc('type interleaved_idx'),'(eval|for|while|)')) )

a = [] a = 1 2 3 4 5

Assertion failed.

2   Fail
x1 = [7 10 13]; x2 = [9 12 15]; y_correct = [7:15]; assert(isequal(interleaved_idx(x1,x2),y_correct) && isempty(regexp(evalc('type interleaved_idx'),'(eval|for|while|)')) )

a = [] a = 7 8 9 a = 7 8 9 10 11 12 a = 7 8 9 10 11 12 13 14 15

Assertion failed.

3   Fail
x1 = [13 7]; x2 = [15 9]; y_correct = [13 14 15 7 8 9]; assert(isequal(interleaved_idx(x1,x2),y_correct) && isempty(regexp(evalc('type interleaved_idx'),'(eval|for|while|)')) )

a = [] a = 13 14 15 a = 13 14 15 7 8 9

Assertion failed.

4   Fail
x1=[1:5:5000];x2=[4:5:5000];y_correct=setdiff([1:5000],[5:5:5000]); assert( isequal(interleaved_idx(x1,x2),y_correct) && isempty(regexp(evalc('type interleaved_idx'),'(eval|for|while|)')) )

a = [] a = 1 2 3 4 a = 1 2 3 4 6 7 8 9 a = 1 2 3 4 6 7 8 9 11 12 13 14 a = 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 a = 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 a = 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 a = 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 32 37 38 39 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 36 37 38 39 41 42 43 44 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 40 37 38 39 41 42 43 44 46 47 48 49 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 44 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 48 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 52 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 56 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 60 73 74 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 64 73 74 76 77 78 79 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 68 73 74 76 77 78 79 81 82 83 84 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 72 73 74 76 77 78 79 81 82 83 84 86 87 88 89 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 76 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 80 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 96 97 98 99 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 84 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 96 97 98 99 101 102 103 104 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 87 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 96 97 98 99 101 102 103 104 106 107 108 Column 88 109 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 87 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 96 97 98 99 101 102 103 104 106 107 108 Columns 88 through 92 109 111 112 113 114 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 87 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 96 97 98 99 101 102 103 104 106 107 108 Columns 88 through 96 109 111 112 113 114 116 117 118 119 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 87 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 96 97 98 99 101 102 103 104 106 107 108 Columns 88 through 100 109 111 112 113 114 116 117 118 119 121 122 123 124 a = Columns 1 through 29 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 Columns 30 through 58 37 38 39 41 42 43 44 46 47 48 49 51 52 53 54 56 57 58 59 61 62 63 64 66 67 68 69 71 72 Columns 59 through 87 73 74 76 77 78 79 81 82 83 84 86 87 88 89 91 92 93 94 96 97 98 99 101 102 103 104 106 107 108 Columns 88 through 104 109 111 112 113 114 116 1...

Assertion failed.