Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
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))
|
2 | Pass |
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))
|
3 | Pass |
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))
|
4 | Pass |
x = 2;
y_correct = repmat( [1 1 1 0 0 0 1 0 1 1 1],[30,1]);
assert(isequal(barEncoder(x),y_correct))
|
5 | Pass |
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))
|
951 Solvers
151 Solvers
Create matrix of replicated elements
321 Solvers
445 Solvers
Find the dimensions of a matrix
373 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!