Cody

Problem 1421. subtract central cross

Solution 1931409

Submitted on 12 Sep 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
x = magic(7); y_correct = [30 39 48 10 19 28 38 47 7 18 27 29 46 6 8 26 35 37 13 15 24 42 44 4 21 23 32 43 3 12 22 31 40 2 11 20]; assert(isequal(central_cross(x),y_correct))

Undefined function 'quorem' for input arguments of type 'double'. Error in central_cross (line 3) [Q,R] = quorem(rownumber,2) Error in Test1 (line 8) assert(isequal(central_cross(x),y_correct))

2   Fail
x = magic(3); y_correct = [8 6 4 2]; assert(isequal(central_cross(x),y_correct))

Undefined function 'quorem' for input arguments of type 'double'. Error in central_cross (line 3) [Q,R] = quorem(rownumber,2) Error in Test2 (line 4) assert(isequal(central_cross(x),y_correct))

3   Fail
x = magic(1); y_correct = []; assert(isequal(central_cross(x),y_correct))

Undefined function 'quorem' for input arguments of type 'double'. Error in central_cross (line 3) [Q,R] = quorem(rownumber,2) Error in Test3 (line 3) assert(isequal(central_cross(x),y_correct))