Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 23;
y_correct = 5;
assert(isequal(dec_2_bin(x),y_correct))
ans =
5
|
2 | Pass |
x = 234;
y_correct = 8;
assert(isequal(dec_2_bin(x),y_correct))
ans =
8
|
3 | Pass |
x = 22;
y_correct = 5;
assert(isequal(dec_2_bin(x),y_correct))
ans =
5
|
4 | Pass |
x = 2;
y_correct = 2;
assert(isequal(dec_2_bin(x),y_correct))
ans =
2
|
How to find the position of an element in a vector without using the find function
2477 Solvers
3968 Solvers
372 Solvers
555 Solvers
708 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!