Cody

Solution 1151705

Submitted on 1 Apr 2017 by H M Dipu Kabir
  • Size: 10
  • This is the leading solution.
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 = 1; y_correct = 1; assert(isequal(rot180(x),y_correct))

ans = []

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

x = 8 1 6 3 5 7 4 9 2 y_correct = 2 9 4 7 5 3 6 1 8 ans = []

3   Pass
A=[2 4;8 6]; y_correct =[ 6 8; 4 2] assert(isequal(rot180(A),y_correct))

y_correct = 6 8 4 2 ans = []

4   Pass
A=[1 2 3; 4 5 6]; y_correct =[ 6 5 4;3 2 1] assert(isequal(rot180(A),y_correct))

y_correct = 6 5 4 3 2 1 ans = []

Suggested Problems

More from this Author70