Cody

Solution 889618

Submitted on 13 May 2016 by Richard Zapor
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
a = [1 5 2 7]; m = 10; y_correct = [1 2 2 2 2 2 3 3 4 4]; assert(isequal(your_fcn_name(a,m),y_correct))

y = 1 y = 1 2 2 2 2 2 y = 1 2 2 2 2 2 3 3 y = 1 2 2 2 2 2 3 3 4 4 4 4 4 4 4

2   Pass
a = [2 3 2 7 4 6]; m = 22; y_correct = [1 1 2 2 2 3 3 4 4 4 4 4 4 4 5 5 5 5 6 6 6 6]; assert(isequal(your_fcn_name(a,m),y_correct))

y = 1 1 y = 1 1 2 2 2 y = 1 1 2 2 2 3 3 y = 1 1 2 2 2 3 3 4 4 4 4 4 4 4 y = Columns 1 through 16 1 1 2 2 2 3 3 4 4 4 4 4 4 4 5 5 Columns 17 through 18 5 5 y = Columns 1 through 16 1 1 2 2 2 3 3 4 4 4 4 4 4 4 5 5 Columns 17 through 24 5 5 6 6 6 6 6 6

Suggested Problems

More from this Author3