Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 0.63;
y_correct = [1 0 1 0 1 1];
assert(isequal(coins(x),y_correct))
x =
0.1300
x =
0.0300
x =
0.0100
x =
-1.7347e-18
y =
1 0 1 0 1 1
|
2 | Pass |
x = 0.49;
y_correct = [0 2 0 1 2 0];
assert(isequal(coins(x),y_correct))
x =
0.2900
x =
0.0900
x =
0.0400
x =
0.0200
x =
-3.4694e-17
y =
0 2 0 1 2 0
|
Increment a number, given its digits
562 Solvers
Getting the indices from a vector
3206 Solvers
373 Solvers
Basic commands - amount of inputs
134 Solvers
708 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!