Cody

Solution 1609842

Submitted on 15 Aug 2018 by dymaxwell
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.7852 0.9587 0.2279 0.0940 0.5333

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.7546 0.6000 0.6952 0.3446 0.8605 0.2221 0.5648 0.9263 0.6445 0.0200 0.4744 0.9938 0.3907 0.6403 0.4183 0.4180 0.1813 0.2110 Columns 19 through 36 0.4637 0.9345 0.2073 0.5643 0.2805 0.8494 0.8792 0.1328 0.1895 0.5845 0.6515 0.8901 0.5491 0.9659 0.2345 0.0209 0.0531 0.7079 Columns 37 through 50 0.9556 0.8065 0.9964 0.1575 0.8898 0.9382 0.1535 0.3187 0.5185 0.5080 0.6489 0.5379 0.7326 0.4108

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'