Cody

Solution 2391524

Submitted on 27 May 2020
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
numBit = 2; analogValue =1; binary=binaryCode(numBit,analogValue); binary_correct= '01'; assert(isequal(binary,binary_correct))

Error in solution: Line: 13 Column: 1 This statement is not inside any function. (It follows the END that terminates the definition of the function "binaryCode".)

2   Fail
numBit = 4; analogValue =15; binary=binaryCode(numBit,analogValue); binary_correct= '1111'; assert(isequal(binary,binary_correct))

Error in solution: Line: 13 Column: 1 This statement is not inside any function. (It follows the END that terminates the definition of the function "binaryCode".)

3   Fail
numBit = 6; analogValue =63; binary=binaryCode(numBit,analogValue); binary_correct= '111111'; assert(isequal(binary,binary_correct))

Error in solution: Line: 13 Column: 1 This statement is not inside any function. (It follows the END that terminates the definition of the function "binaryCode".)

Suggested Problems