Cody

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

Solution 1907195

Submitted on 21 Aug 2019 by Pauli Huusari
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))

ans = [] id = 0 id = 1 ans = 1 id = 2 ans = 1 2 id = 3 ans = 1 2 2

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

ans = [] id = 0 id = 1 ans = 1 id = 2 ans = 1 2 id = 3 ans = 1 2 2 id = 4 ans = 1 2 2 3 id = 5 ans = 1 2 2 3 3 id = 6 ans = 1 2 2 3 3 3 id = 7 ans = 1 2 2 3 3 3 4 id = 8 ans = 1 2 2 3 3 3 4 4 id = 9 ans = 1 2 2 3 3 3 4 4 4 id = 10 ans = 1 2 2 3 3 3 4 4 4 4 id = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 id = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 id = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 id = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 id = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5

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

ans = [] id = 0 id = 1 ans = 1 id = 2 ans = 1 2 id = 3 ans = 1 2 2 id = 4 ans = 1 2 2 3 id = 5 ans = 1 2 2 3 3 id = 6 ans = 1 2 2 3 3 3 id = 7 ans = 1 2 2 3 3 3 4 id = 8 ans = 1 2 2 3 3 3 4 4 id = 9 ans = 1 2 2 3 3 3 4 4 4 id = 10 ans = 1 2 2 3 3 3 4 4 4 4 id = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 id = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 id = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 id = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 id = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 id = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 id = 17 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 id = 18 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 id = 19 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 id = 20 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 id = 21 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 id = 22 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 51 ans = Columns 1 through 30 1 2 ...

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

ans = [] id = 0 id = 1 ans = 1 id = 2 ans = 1 2 id = 3 ans = 1 2 2 id = 4 ans = 1 2 2 3 id = 5 ans = 1 2 2 3 3 id = 6 ans = 1 2 2 3 3 3 id = 7 ans = 1 2 2 3 3 3 4 id = 8 ans = 1 2 2 3 3 3 4 4 id = 9 ans = 1 2 2 3 3 3 4 4 4 id = 10 ans = 1 2 2 3 3 3 4 4 4 4 id = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 id = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 id = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 id = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 id = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 id = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 id = 17 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 id = 18 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 id = 19 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 id = 20 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 id = 21 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 id = 22 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 51 ans = Columns 1 through 30 1 2 ...

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

ans = [] id = 0 id = 1 ans = 1 id = 2 ans = 1 2 id = 3 ans = 1 2 2 id = 4 ans = 1 2 2 3 id = 5 ans = 1 2 2 3 3 id = 6 ans = 1 2 2 3 3 3 id = 7 ans = 1 2 2 3 3 3 4 id = 8 ans = 1 2 2 3 3 3 4 4 id = 9 ans = 1 2 2 3 3 3 4 4 4 id = 10 ans = 1 2 2 3 3 3 4 4 4 4 id = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 id = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 id = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 id = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 id = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 id = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 id = 17 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 id = 18 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 id = 19 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 id = 20 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 id = 21 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 id = 22 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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

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

ans = [] id = 0 id = 1 ans = 1 id = 2 ans = 1 2 id = 3 ans = 1 2 2 id = 4 ans = 1 2 2 3 id = 5 ans = 1 2 2 3 3 id = 6 ans = 1 2 2 3 3 3 id = 7 ans = 1 2 2 3 3 3 4 id = 8 ans = 1 2 2 3 3 3 4 4 id = 9 ans = 1 2 2 3 3 3 4 4 4 id = 10 ans = 1 2 2 3 3 3 4 4 4 4 id = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 id = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 id = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 id = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 id = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 id = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 id = 17 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 id = 18 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 id = 19 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 id = 20 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 id = 21 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 id = 22 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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

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

ans = [] id = 0 id = 1 ans = 1 id = 2 ans = 1 2 id = 3 ans = 1 2 2 id = 4 ans = 1 2 2 3 id = 5 ans = 1 2 2 3 3 id = 6 ans = 1 2 2 3 3 3 id = 7 ans = 1 2 2 3 3 3 4 id = 8 ans = 1 2 2 3 3 3 4 4 id = 9 ans = 1 2 2 3 3 3 4 4 4 id = 10 ans = 1 2 2 3 3 3 4 4 4 4 id = 11 ans = 1 2 2 3 3 3 4 4 4 4 5 id = 12 ans = 1 2 2 3 3 3 4 4 4 4 5 5 id = 13 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 id = 14 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 id = 15 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 id = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 id = 17 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 id = 18 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 id = 19 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 id = 20 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 id = 21 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 id = 22 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 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 id = 51 ans = Columns 1 through 30 1 2 ...