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))
|
2 | Pass |
%%
x = -3:3;
y_correct = [ 0 0 0 1 1 1 1];
assert(isequal(HL(x),y_correct))
|
5833 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
278 Solvers
Generate N equally spaced intervals between -L and L
563 Solvers
Reverse the elements of an array
687 Solvers
276 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!