Cody

# Problem 535. Rotate and display numbered tile

Solution 1885232

Submitted on 26 Jul 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   Fail
t = [1 5 7 9]; north = 3; td = [' 7 ' ' 5 9' ' 1 ']; assert(isequal(rotate_tile(t, north),td))

Undefined function 'str' for input arguments of type 'char'. Error in rotate_tile>int2strD (line 11) str += ' '; Error in rotate_tile (line 3) td = [' '+int2strD(t(mod(north+3,4)))+' ', Error in Test1 (line 6) assert(isequal(rotate_tile(t, north),td))

2   Fail
t = [27 8 5 46]; north = 4; td = [' 46 ' ' 5 27' ' 8 ']; assert(isequal(rotate_tile(t, north),td))

Undefined function 'str' for input arguments of type 'char'. Error in rotate_tile>int2strD (line 11) str += ' '; Error in rotate_tile (line 3) td = [' '+int2strD(t(mod(north+3,4)))+' ', Error in Test2 (line 6) assert(isequal(rotate_tile(t, north),td))

3   Fail
t = [9 57 75 9]; north = 2; td = [' 57 ' ' 9 75' ' 9 ']; assert(isequal(rotate_tile(t, north),td))

Undefined function 'str' for input arguments of type 'char'. Error in rotate_tile>int2strD (line 11) str += ' '; Error in rotate_tile (line 3) td = [' '+int2strD(t(mod(north+3,4)))+' ', Error in Test3 (line 6) assert(isequal(rotate_tile(t, north),td))