Cody

Solution 1988752

Submitted on 24 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 = 10; y_correct = 245; assert(isequal(binInvert(x),y_correct))

x = uint8 10 y = 1 0 1 0 y = 1×4 logical array 0 1 0 1

Assertion failed.

2   Fail
x = 245; y_correct = 10; assert(isequal(binInvert(x),y_correct))

x = uint8 245 y = 1 1 1 1 0 1 0 1 y = 1×8 logical array 0 0 0 0 1 0 1 0

Assertion failed.

3   Fail
x = 20; y_correct = 235; assert(isequal(binInvert(x),y_correct))

x = uint8 20 y = 1 0 1 0 0 y = 1×5 logical array 0 1 0 1 1

Assertion failed.

4   Fail
x = 235; y_correct = 20; assert(isequal(binInvert(x),y_correct))

x = uint8 235 y = 1 1 1 0 1 0 1 1 y = 1×8 logical array 0 0 0 1 0 1 0 0

Assertion failed.