Cody

Solution 2044537

Submitted on 3 Dec 2019 by Asif Newaz
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 = 17; y_correct = [1 1 0 0 1]; assert(isequal(dec2gray(x),y_correct))

a = '10001' b = 1 1 b = 1 1 0 b = 1 1 0 0 b = 1 1 0 0 1

2   Pass
x = 7; y_correct = [1 0 0]; assert(isequal(dec2gray(x),y_correct))

a = '111' b = 1 0 b = 1 0 0

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

a = '11' b = 1 0

4   Pass
x = 31; y_correct = [1 0 0 0 0]; assert(isequal(dec2gray(x),y_correct))

a = '11111' b = 1 0 b = 1 0 0 b = 1 0 0 0 b = 1 0 0 0 0