Cody

Problem 42721. Fun with a compass

Solution 846753

Submitted on 8 Mar 2016
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 = 5; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

2   Fail
x = 6; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

3   Fail
x = 7; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

4   Fail
x = 9; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

5   Fail
x = 13; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

6   Fail
x = 17; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

7   Fail
x = 21; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

8   Fail
x = 51; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

9   Fail
x = 257; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

10   Fail
x = 258; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

11   Fail
x = 640; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

12   Fail
x = 1234; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

13   Fail
x = 2016; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

14   Fail
x = 2056; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

15   Fail
x = 65535; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

16   Fail
x = 65536; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

17   Fail
x = 65537; y_correct = 1; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

18   Fail
x = 65538; y_correct = 0; assert(isequal(compass_construction(x),y_correct))

Error using ismember (line 57) Not enough input arguments.

Suggested Problems

More from this Author80

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!