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))
[Warning: repmat(A,M) or repmat(A,M,N) where M or N is an empty array will return an error in a future release. Replace empty array inputs with 1 instead.]
[> In barEncoder (line 2)
In ScoringEngineTestPoint1 (line 3)
In solutionTest (line 3)]
|
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))
[Warning: repmat(A,M) or repmat(A,M,N) where M or N is an empty array will return an error in a future release. Replace empty array inputs with 1 instead.]
[> In barEncoder (line 2)
In ScoringEngineTestPoint2 (line 3)
In solutionTest (line 5)]
|
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))
[Warning: repmat(A,M) or repmat(A,M,N) where M or N is an empty array will return an error in a future release. Replace empty array inputs with 1 instead.]
[> In barEncoder (line 2)
In ScoringEngineTestPoint3 (line 3)
In solutionTest (line 7)]
|
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))
[Warning: repmat(A,M) or repmat(A,M,N) where M or N is an empty array will return an error in a future release. Replace empty array inputs with 1 instead.]
[> In barEncoder (line 2)
In ScoringEngineTestPoint4 (line 3)
In solutionTest (line 9)]
|
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))
[Warning: repmat(A,M) or repmat(A,M,N) where M or N is an empty array will return an error in a future release. Replace empty array inputs with 1 instead.]
[> In barEncoder (line 2)
In ScoringEngineTestPoint5 (line 3)
In solutionTest (line 11)]
|
6719 Solvers
1900 Solvers
97 Solvers
Find a subset that divides the vector into equal halves
332 Solvers
Arrange vector in ascending order
624 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!