Cody

Solution 2119047

Submitted on 5 Feb 2020 by Gopher Wood
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 4 3 1 6 4 6]; y_correct = [1 6 2 4 3]; assert(isequal(MinMax(x),y_correct))

2   Pass
x=magic(3); y_correct = [1 9 2 8 3 7 4 6 5]; assert(isequal(MinMax(x),y_correct))

3   Pass
v=[-2,3,1] x=toeplitz(v); y_correct = [-2,3,1]; assert(isequal(MinMax(x),y_correct))

v = -2 3 1

4   Pass
x=[ 1 1 1 2 2 2 3 3 3 0 0 -3 -1 -2]; y_correct = [-3 3 -2 2 -1 1 0]; assert(isequal(MinMax(x),y_correct))

5   Pass
x=[zeros(4),ones(4)] y_correct = [0 1]; assert(isequal(MinMax(x),y_correct))

x = 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

Suggested Problems

More from this Author145