Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = rand(1,10);
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
|
2 | Pass |
%%
x = rand(1,100);
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
|
3 | Pass |
%%
x = ['A' 'long' 'time' 'ago' 'in' 'a' 'galaxy' 'far' 'far' 'away'];
actual = everyOther(x);
expected = x(1:2:length(x));
assert(isequal(actual, expected))
|
Find the longest sequence of 1's in a binary sequence.
3369 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
277 Solvers
Who is the smartest MATLAB programmer?
561 Solvers
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
358 Solvers
249 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!