Cody

# Problem 1118. Colon operator of two vectors

Solution 1761972

Submitted on 26 Mar 2019 by Abdelfatah Teamah
• Size: 8
• This is the leading solution.
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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vec_colon (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)]

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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vec_colon (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

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

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vec_colon (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]