Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 1;
offset = 2
y_correct = 3;
assert(isequal(constant_offset(a,offset),y_correct))
offset =
2
|
2 | Pass |
a = [-1 1];
offset = 2
y_correct = [1 3];
assert(isequal(constant_offset(a,offset),y_correct))
offset =
2
|
3 | Pass |
a = [-10:1:1];
offset = 10
y_correct = [0:11];
assert(isequal(constant_offset(a,offset),y_correct))
offset =
10
|
Select every other element of a vector
20354 Solvers
238 Solvers
The sum of the numbers in the vector
426 Solvers
Area of an equilateral triangle
2763 Solvers
273 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!