Cody

Solution 1554349

Submitted on 8 Jun 2018 by J. S. Kowontan
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   Pass
x = 1; y_correct = 0; assert(isequal(one_Comp(x),y_correct))

[Warning: This concatenation operation includes an empty array with an incorrect number of rows. Concatenation including empty arrays will require all arrays to have the same number of rows in a future release.] [> In one_Comp (line 3) In ScoringEngineTestPoint1 (line 3) In solutionTest (line 3)]

2   Pass
x = 100; y_correct = [0,1,1]; assert(isequal(one_Comp(x),y_correct))

[Warning: This concatenation operation includes an empty array with an incorrect number of rows. Concatenation including empty arrays will require all arrays to have the same number of rows in a future release.] [> In one_Comp (line 3) In ScoringEngineTestPoint2 (line 3) In solutionTest (line 5)]

3   Pass
x = 1110; y_correct = [0,0,0,1]; assert(isequal(one_Comp(x),y_correct))

[Warning: This concatenation operation includes an empty array with an incorrect number of rows. Concatenation including empty arrays will require all arrays to have the same number of rows in a future release.] [> In one_Comp (line 3) In ScoringEngineTestPoint3 (line 3) In solutionTest (line 7)]

4   Pass
x = 101101101001; y_correct = [0,1,0,0,1,0,0,1,0,1,1,0]; assert(isequal(one_Comp(x),y_correct))

[Warning: This concatenation operation includes an empty array with an incorrect number of rows. Concatenation including empty arrays will require all arrays to have the same number of rows in a future release.] [> In one_Comp (line 3) In ScoringEngineTestPoint4 (line 3) In solutionTest (line 9)]

5   Pass
x = 00110; y_correct = [1,1,0,0,1]; assert(isequal(one_Comp(x),y_correct))

Suggested Problems