Cody

Solution 2010690

Submitted on 9 Nov 2019 by kristie moore
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

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))

y = 0.5890 0.1797 0.2736 0.3623 0.2010

2   Pass
x = rand(1,100); actual = everyOther(x); expected = x(1:2:length(x)); assert(isequal(actual, expected))

y = Columns 1 through 18 0.9666 0.2564 0.8291 0.7523 0.9920 0.2649 0.6171 0.7453 0.0957 0.7711 0.9987 0.6588 0.1717 0.0607 0.4457 0.2224 0.1453 0.7597 Columns 19 through 36 0.9311 0.3650 0.5313 0.0955 0.8798 0.9603 0.4178 0.9898 0.6984 0.0547 0.2300 0.5081 0.8098 0.2507 0.0845 0.1225 0.2798 0.7483 Columns 37 through 50 0.5832 0.9720 0.8652 0.2485 0.5402 0.9820 0.1334 0.4275 0.0408 0.7920 0.4971 0.3566 0.6343 0.5439

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))

y = 'Aogiegiaaayafrwy'