Cody

Solution 1370480

Submitted on 6 Dec 2017 by Rodney Foster
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.5647 0.8513 0.7779 0.1363 0.6153

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

y = Columns 1 through 17 0.9065 0.1272 0.9023 0.3919 0.3013 0.9176 0.2630 0.7976 0.8955 0.2445 0.1639 0.0473 0.3654 0.0234 0.0740 0.2274 0.1841 Columns 18 through 34 0.0966 0.6192 0.5942 0.9307 0.9525 0.4268 0.0966 0.1007 0.8989 0.1706 0.9084 0.1075 0.1613 0.1757 0.9044 0.2060 0.3960 Columns 35 through 50 0.4040 0.0417 0.0360 0.9525 0.7945 0.2654 0.9947 0.1087 0.8991 0.4983 0.7088 0.9478 0.4150 0.2314 0.5210 0.6739

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'