Cody

Solution 2483066

Submitted on 6 Jun 2020 by Ramesh Kumar V
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   Pass
VecStart= [10 20 30 40 50 ]; VecEnd = [11 22 33 44 50]; y_correct = [10 11 20 21 22 30 31 32 33 40 41 42 43 44 50]; assert(isequal(vec_colon(VecStart,VecEnd ),y_correct))

z = 10 11 c = 10 11 z = 20 21 22 c = 10 11 20 21 22 z = 30 31 32 33 c = 10 11 20 21 22 30 31 32 33 z = 40 41 42 43 44 c = 10 11 20 21 22 30 31 32 33 40 41 42 43 44 z = 50 c = 10 11 20 21 22 30 31 32 33 40 41 42 43 44 50

2   Pass
VecStart= [2 10 5 15 10 5 2 100 ]; VecEnd = [3 10 6 17 12 7 3 102]; y_correct = [2 3 10 5 6 15 16 17 10 11 12 5 6 7 2 3 100 101 102]; assert(isequal(vec_colon(VecStart,VecEnd ),y_correct))

z = 2 3 c = 2 3 z = 10 c = 2 3 10 z = 5 6 c = 2 3 10 5 6 z = 15 16 17 c = 2 3 10 5 6 15 16 17 z = 10 11 12 c = 2 3 10 5 6 15 16 17 10 11 12 z = 5 6 7 c = 2 3 10 5 6 15 16 17 10 11 12 5 6 7 z = 2 3 c = 2 3 10 5 6 15 16 17 10 11 12 5 6 7 2 3 z = 100 101 102 c = 2 3 10 5 6 15 16 17 10 11 12 5 6 7 2 3 100 101 102

3   Pass
VecStart = [1:10:500]; VecEnd = [10:10:500]; y_correct = [1:500]; assert(isequal(vec_colon(VecStart,VecEnd ),y_correct))

z = 1 2 3 4 5 6 7 8 9 10 c = 1 2 3 4 5 6 7 8 9 10 z = 11 12 13 14 15 16 17 18 19 20 c = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 z = 21 22 23 24 25 26 27 28 29 30 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Column 30 30 z = 31 32 33 34 35 36 37 38 39 40 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 40 30 31 32 33 34 35 36 37 38 39 40 z = 41 42 43 44 45 46 47 48 49 50 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 50 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 z = 51 52 53 54 55 56 57 58 59 60 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 60 59 60 z = 61 62 63 64 65 66 67 68 69 70 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 70 59 60 61 62 63 64 65 66 67 68 69 70 z = 71 72 73 74 75 76 77 78 79 80 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 80 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 z = 81 82 83 84 85 86 87 88 89 90 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 87 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Columns 88 through 90 88 89 90 z = 91 92 93 94 95 96 97 98 99 100 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 87 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Columns 88 through 100 88 89 90 91 92 93 94 95 96 97 98 99 100 z = 101 102 103 104 105 106 107 108 109 110 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 87 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Columns 88 through 110 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 z = 111 112 113 114 115 116 117 118 119 120 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 87 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Columns 88 through 116 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 Columns 117 through 120 117 118 119 120 z = 121 122 123 124 125 126 127 128 129 130 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 87 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Columns 88 through 116 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 Columns 117 through 130 117 118 119 120 121 122 123 124 125 126 127 128 129 130 z = 131 132 133 134 135 136 137 138 139 140 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 87 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Columns 88 through 116 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 Columns 117 through 140 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 z = 141 142 143 144 145 146 147 148 149 150 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 Columns 59 through 87 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Columns 88 through 116 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 Columns 117 through 145 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 Columns 146 through 150 146 147 148 149 150 z = 151 152 153 154 155 156 157 158 159 160 c = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 58 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 4...

Suggested Problems