Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x = 5;
y_correct = repmat( [1 1 1 0 0 0 1 0 1 0 0 0 1 1 1],[30,1]);;
assert(isequal(barEncoder(x),y_correct))
in =
5
z =
1×0 empty double row vector
tau =
[]
|
2 | Fail |
x = 12;
y_correct = repmat( [1 1 1 0 0 0 1 0 0 0 1 0 1 0 1 1 1],[30,1]);;
assert(isequal(barEncoder(x),y_correct))
in =
12
z =
1×0 empty double row vector
tau =
[]
|
3 | Fail |
x = 135;
y_correct = repmat( [1 1 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 1],[30,1]);;
assert(isequal(barEncoder(x),y_correct))
in =
135
z =
1×0 empty double row vector
tau =
[]
|
4 | Fail |
x = 2;
y_correct = repmat( [1 1 1 0 0 0 1 0 1 1 1],[30,1]);
assert(isequal(barEncoder(x),y_correct))
in =
2
z =
1×0 empty double row vector
tau =
[]
|
5 | Fail |
x = 22;
y_correct = repmat( [1 1 1 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 1 1],[30,1]);
assert(isequal(barEncoder(x),y_correct))
in =
22
z =
1×0 empty double row vector
tau =
[]
|
185 Solvers
401 Solvers
Multiples of a Number in a Given Range
214 Solvers
436 Solvers
206 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!