Cody

Solution 2037706

Submitted on 28 Nov 2019
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 = magic(3); degrees=180; y_correct = rot90(x,2); assert(isequal( rot(x,degrees),y_correct))

2   Pass
x = magic(4); degrees=270; y_correct = rot90(x,3); assert(isequal( rot(x,degrees),y_correct))

3   Pass
x = magic(5); degrees=360; y_correct = x; assert(isequal( rot(x,degrees),y_correct))

4   Pass
x=[1,4,2,6;3,4,5,6;1,1,1,1;2,2,2,2]; degrees=630; y_correct = rot90(x,7); assert(isequal( rot(x,degrees),y_correct))

5   Pass
x=[1,4,2,6;3,4,5,6;1,1,1,1;2,2,2,2]; degrees=1170; y_correct = rot90(x,13); assert(isequal( rot(x,degrees),y_correct))

6   Fail
assert(isempty(regexp(evalc('type rot'),'(eval|flip|transpose|fliplr|flipud|flipdim|rot90|)')))

Assertion failed.

Suggested Problems

More from this Author39