Cody

Problem 43602. Convert array of decimal numbers into binary numbers array.

Solution 1028395

Submitted on 23 Oct 2016 by Peng Liu
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
x = 1; y_correct = 1; assert(isequal(Converter(x),y_correct))

2   Pass
x = [1 2 3 4 5 6 7 8 ]; y_correct = [1 10 11 100 101 110 111 1000]; assert(isequal(Converter(x),y_correct'))

3   Pass
x = [8 9 10 11 12 13 14 15 16 17 18 19 20 ]; y_correct = [1000 1001 1010 1011 1100 1101 1110 1111 10000 10001 10010 10011 10100]; assert(isequal(Converter(x),y_correct'))

Suggested Problems

More from this Author37

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!