Cody

# Problem 1035. Generate a vector like 1,2,2,3,3,3,4,4,4,4

Solution 1910800

Submitted on 24 Aug 2019 by Sivakumar Selvam
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
x = 2; y_correct = [1 2 2]; assert(isequal(your_fcn_name(x),y_correct))

j = 1 ans = 1 j = 2 ans = 1 2 j = 3 ans = 1 2 2 j = 4

2   Pass
x = 5; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5]; assert(isequal(your_fcn_name(x),y_correct))

j = 1 ans = 1 j = 2 ans = 1 2 j = 3 ans = 1 2 2 j = 4 ans = 1 2 2 3 j = 5 ans = 1 2 2 3 3 j = 6 ans = 1 2 2 3 3 3 j = 7 ans = 1 2 2 3 3 3 4 j = 8 ans = 1 2 2 3 3 3 4 4 j = 9 ans = 1 2 2 3 3 3 4 4 4 j = 10 ans = 1 2 2 3 3 3 4 4 4 4 j = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 j = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 j = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 j = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 j = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 j = 16

3   Pass
x = 10; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10]; assert(isequal(your_fcn_name(x),y_correct))

j = 1 ans = 1 j = 2 ans = 1 2 j = 3 ans = 1 2 2 j = 4 ans = 1 2 2 3 j = 5 ans = 1 2 2 3 3 j = 6 ans = 1 2 2 3 3 3 j = 7 ans = 1 2 2 3 3 3 4 j = 8 ans = 1 2 2 3 3 3 4 4 j = 9 ans = 1 2 2 3 3 3 4 4 4 j = 10 ans = 1 2 2 3 3 3 4 4 4 4 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3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Column 31 8 j = 32 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 j = 33 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 j = 34 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 j = 35 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 j = 36 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 j = 37 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 j = 38 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 j = 39 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 j = 40 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 j = 41 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 j = 42 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 j = 43 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 j = 44 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 j = 45 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 j = 46 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 46 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 j = 47 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 47 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 j = 48 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 48 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 j = 49 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 49 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 j = 50 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 50 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 j = 51 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 ...

4   Pass
x = 12; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 ... 11 11 11 11 11 11 11 11 11 11 11 ... 12 12 12 12 12 12 12 12 12 12 12 12]; assert(isequal(your_fcn_name(x),y_correct))

j = 1 ans = 1 j = 2 ans = 1 2 j = 3 ans = 1 2 2 j = 4 ans = 1 2 2 3 j = 5 ans = 1 2 2 3 3 j = 6 ans = 1 2 2 3 3 3 j = 7 ans = 1 2 2 3 3 3 4 j = 8 ans = 1 2 2 3 3 3 4 4 j = 9 ans = 1 2 2 3 3 3 4 4 4 j = 10 ans = 1 2 2 3 3 3 4 4 4 4 j = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 j = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 j = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 j = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 j = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 j = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 j = 17 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 j = 18 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 j = 19 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 j = 20 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 j = 21 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 j = 22 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 j = 23 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 j = 24 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 j = 25 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 j = 26 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 j = 27 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 j = 28 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 j = 29 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 j = 30 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 j = 31 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Column 31 8 j = 32 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 j = 33 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 j = 34 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 j = 35 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 j = 36 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 j = 37 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 j = 38 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 j = 39 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 j = 40 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 j = 41 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 j = 42 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 j = 43 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 j = 44 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 j = 45 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 j = 46 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 46 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 j = 47 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 47 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 j = 48 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 48 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 j = 49 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 49 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 j = 50 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 50 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 j = 51 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 ...

5   Pass
x = 9; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9]; assert(isequal(your_fcn_name(x),y_correct))

j = 1 ans = 1 j = 2 ans = 1 2 j = 3 ans = 1 2 2 j = 4 ans = 1 2 2 3 j = 5 ans = 1 2 2 3 3 j = 6 ans = 1 2 2 3 3 3 j = 7 ans = 1 2 2 3 3 3 4 j = 8 ans = 1 2 2 3 3 3 4 4 j = 9 ans = 1 2 2 3 3 3 4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7 7 7 8 8 j = 31 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Column 31 8 j = 32 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 j = 33 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 j = 34 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 j = 35 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 j = 36 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 j = 37 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 j = 38 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 j = 39 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 j = 40 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 j = 41 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 j = 42 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 j = 43 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 j = 44 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 j = 45 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 j = 46

6   Pass
x = 7; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7]; assert(isequal(your_fcn_name(x),y_correct))

j = 1 ans = 1 j = 2 ans = 1 2 j = 3 ans = 1 2 2 j = 4 ans = 1 2 2 3 j = 5 ans = 1 2 2 3 3 j = 6 ans = 1 2 2 3 3 3 j = 7 ans = 1 2 2 3 3 3 4 j = 8 ans = 1 2 2 3 3 3 4 4 j = 9 ans = 1 2 2 3 3 3 4 4 4 j = 10 ans = 1 2 2 3 3 3 4 4 4 4 j = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 j = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 j = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 j = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 j = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 j = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 j = 17 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 j = 18 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 j = 19 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 j = 20 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 j = 21 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 j = 22 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 j = 23 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 j = 24 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 j = 25 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 j = 26 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 j = 27 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 j = 28 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 j = 29

7   Pass
x = 15; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 ... 11 11 11 11 11 11 11 11 11 11 11 ... 12 12 12 12 12 12 12 12 12 12 12 12 ... 13 13 13 13 13 13 13 13 13 13 13 13 13 ... 14 14 14 14 14 14 14 14 14 14 14 14 14 14 ... 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15]; assert(isequal(your_fcn_name(x),y_correct))

j = 1 ans = 1 j = 2 ans = 1 2 j = 3 ans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 7 7 7 7 j = 29 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 j = 30 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 j = 31 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Column 31 8 j = 32 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 j = 33 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 j = 34 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 j = 35 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 j = 36 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 j = 37 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 j = 38 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 j = 39 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 j = 40 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 j = 41 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 j = 42 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 j = 43 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 j = 44 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 j = 45 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 j = 46 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 46 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 j = 47 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 47 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 j = 48 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 48 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 j = 49 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 49 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 j = 50 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 50 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 j = 51 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 ...