Cody

Solution 2023025

Submitted on 15 Nov 2019 at 13:00 by Atsushi Ueno
  • Size: 19
  • This is the leading solution.
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))

ans = 1 1 0 0 1

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

ans = 1 0 0

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

ans = 1 0

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

ans = 1 0 0 0 0