This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = -2:2;
y_correct = [0 0 1 1 1];
assert(isequal(HL(x),y_correct))
y =
0 0 1 0 0
y =
0 0 1 1 0
y =
0 0 1 1 1
|
2 | Pass |
%%
x = -3:3;
y_correct = [ 0 0 0 1 1 1 1];
assert(isequal(HL(x),y_correct))
y =
0 0 0 1 0 0 0
y =
0 0 0 1 1 0 0
y =
0 0 0 1 1 1 0
y =
0 0 0 1 1 1 1
|
Least common multiple of many numbers
189 Solvers
173 Solvers
559 Solvers
find the maximum element of the matrix
348 Solvers
Matlab Basics - Create a row vector
277 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!