Cody

Solution 1962282

Submitted on 6 Oct 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 = 1000; y_correct = 1100; assert(isequal(binary2gray(x),y_correct))

num = 540 num = 742 num = 667 num = 677 num = 698 num = 693 num = 690 num = 689 num = 688

Assertion failed.

2   Fail
x = 0010; y_correct = 0011; assert(isequal(binary2gray(x),y_correct))

num = 15 num = 13 num = 12

Assertion failed.

3   Fail
x = 0011; y_correct = 0010; assert(isequal(binary2gray(x),y_correct))

num = 14 num = 12 num = 13

Assertion failed.