Cody

Solution 1880479

Submitted on 21 Jul 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
x = 2; y_correct = [1 2 2]; assert(isequal(your_fcn_name(x),y_correct))

ans = 0 1 ans = 0 1 0 0 1 1 2 2

Assertion failed.

2   Fail
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 = 0 1 ans = 0 1 0 0 1 1 2 2 ans = 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 40 2 2 2 3 3 3 3 4 4 4 4 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 70 3 3 4 4 4 4 4 5 5 5 5 5

Assertion failed.

3   Fail
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 = 0 1 ans = 0 1 0 0 1 1 2 2 ans = 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 40 2 2 2 3 3 3 3 4 4 4 4 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 70 3 3 4 4 4 4 4 5 5 5 5 5 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 112 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 168 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 240 8 8 8 8 8 8 8 8 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 261 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 Columns 262 through 290 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 Columns 291 through 319 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 Columns 320 through 330 8 8 9 9 9 9 9 9 9 9 9 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 261 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 Columns 262 through 290 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 Columns 291 through 319 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 Columns 320 through 348 8 8 9 9 9 9 9 9 9 9 9 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Columns 349 through 377 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 Columns 378 through 406 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 Columns 407 through 435 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9...

Assertion failed.

4   Fail
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 = 0 1 ans = 0 1 0 0 1 1 2 2 ans = 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 40 2 2 2 3 3 3 3 4 4 4 4 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 70 3 3 4 4 4 4 4 5 5 5 5 5 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 112 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 168 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 240 8 8 8 8 8 8 8 8 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 261 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 Columns 262 through 290 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 Columns 291 through 319 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 Columns 320 through 330 8 8 9 9 9 9 9 9 9 9 9 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 261 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 Columns 262 through 290 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 Columns 291 through 319 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 Columns 320 through 348 8 8 9 9 9 9 9 9 9 9 9 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Columns 349 through 377 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 Columns 378 through 406 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 Columns 407 through 435 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9...

Assertion failed.

5   Fail
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 = 0 1 ans = 0 1 0 0 1 1 2 2 ans = 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 40 2 2 2 3 3 3 3 4 4 4 4 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 70 3 3 4 4 4 4 4 5 5 5 5 5 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 112 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 168 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 240 8 8 8 8 8 8 8 8 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 261 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 Columns 262 through 290 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 Columns 291 through 319 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 Columns 320 through 330 8 8 9 9 9 9 9 9 9 9 9

Assertion failed.

6   Fail
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 = 0 1 ans = 0 1 0 0 1 1 2 2 ans = 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 40 2 2 2 3 3 3 3 4 4 4 4 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 70 3 3 4 4 4 4 4 5 5 5 5 5 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 112 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 168 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7

Assertion failed.

7   Fail
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 = 0 1 ans = 0 1 0 0 1 1 2 2 ans = 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 40 2 2 2 3 3 3 3 4 4 4 4 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 70 3 3 4 4 4 4 4 5 5 5 5 5 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 112 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 168 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 240 8 8 8 8 8 8 8 8 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 261 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 Columns 262 through 290 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 Columns 291 through 319 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 Columns 320 through 330 8 8 9 9 9 9 9 9 9 9 9 ans = Columns 1 through 29 0 1 0 0 1 1 2 2 0 0 0 1 1 1 2 2 2 3 3 3 0 0 0 0 1 1 1 1 2 Columns 30 through 58 2 2 2 3 3 3 3 4 4 4 4 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 Columns 59 through 87 3 3 4 4 4 4 4 5 5 5 5 5 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 Columns 88 through 116 2 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 0 0 0 0 Columns 117 through 145 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 Columns 146 through 174 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 0 0 0 0 0 0 Columns 175 through 203 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 Columns 204 through 232 4 4 4 4 4 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 Columns 233 through 261 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 Columns 262 through 290 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 Columns 291 through 319 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 Columns 320 through 348 8 8 9 9 9 9 9 9 9 9 9 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Columns 349 through 377 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 Columns 378 through 406 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 Columns 407 through 435 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9...

Assertion failed.