Cody

Solution 1366207

Submitted on 2 Dec 2017
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 3 3 4 3 4]; y_correct = [2;3;3;3;4;4]; assert(isequal(rearrange(x),y_correct))

Error using reshape To RESHAPE the number of elements must not change. Error in rearrange (line 2) y =reshape(x,[1,1]) Error in Test1 (line 5) assert(isequal(rearrange(x),y_correct))

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

Error using reshape To RESHAPE the number of elements must not change. Error in rearrange (line 2) y =reshape(x,[1,1]) Error in Test2 (line 5) assert(isequal(rearrange(x),y_correct))

More from this Author27