i use dec2bin but it shows error pls help me
Note that dec2bin returns a character string, but the test suite asks for numbers.
thank you
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
x = 8;
y_correct = 1000;
assert(isequal(binary_coder(x),y_correct))
Error: Assertion failed.
|
2 | Fail |
%%
x = 24;
y_correct = 11000;
assert(isequal(binary_coder(x),y_correct))
Error: Assertion failed.
|
5704 Solvers
2401 Solvers
Number of 1s in a binary string
2826 Solvers
Check if number exists in vector
4470 Solvers
264 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!