Cody

Solution 1891342

Submitted on 3 Aug 2019 by Oliver Warlow
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 = 1

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 = 2 9 4 7 5 3 6 1 8

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 = 6 8 4 2

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 = 6 5 4 3 2 1