Cody

Solution 1699821

Submitted on 27 Dec 2018 by yuheng su
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.6334 0.8082 0.4186 0.1463 0.6481

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.2566 0.2094 0.2855 0.1109 0.7145 0.8188 0.5462 0.8174 0.5023 0.0477 0.9917 0.4546 0.1603 0.0300 0.7934 0.2283 0.2214 Columns 18 through 34 0.7477 0.6453 0.9153 0.8582 0.8099 0.5734 0.5791 0.8647 0.5815 0.7339 0.3390 0.0164 0.7586 0.8248 0.8518 0.6474 0.4215 Columns 35 through 50 0.9209 0.6930 0.9988 0.8902 0.3673 0.1815 0.1363 0.2696 0.8775 0.7563 0.8863 0.5723 0.8250 0.2948 0.5262 0.5550

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'