Cody

Solution 927249

Submitted on 25 Jul 2016 by Stephanie O'Neil
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 = [15 42 91 17 7 4]; y_correct = [17 7 4 15 42 91]; assert(isequal(your_fcn_name(x),y_correct))

h = 3 y = 17 7 4 15 42 91 Vec = 3 2 6 2 6 6 5 2 5 1

2   Pass
x = [2 10]; y_correct = [10 2]; y = your_fcn_name(x); assert(isequal(y_correct,y))

h = 1 y = 10 2 Vec = 2 6 3 3 4 1 2 3 4 5

3   Pass
x = [27 1 13 11 22 23 6 14]; y_correct = [22 23 6 14 27 1 13 11]; y = your_fcn_name(x); assert(isequal(y_correct,y))

h = 4 y = 22 23 6 14 27 1 13 11 Vec = 3 3 1 5 1 2 5 1 6 2

4   Pass
x = [13 14 5 13 12 3 3 9 18 7 11 5 14 5]; y_correct = [9 18 7 11 5 14 5 13 14 5 13 12 3 3]; y = your_fcn_name(x); assert(isequal(y_correct,y))

h = 7 y = 9 18 7 11 5 14 5 13 14 5 13 12 3 3 Vec = 1 6 5 6 1 6 5 2 6 5

Suggested Problems

More from this Author1