Cody

Solution 1004930

Submitted on 10 Oct 2016 by kyuhoon lee
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.1335 0.3022 0.3958 0.9063 0.1251

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

y = Columns 1 through 9 0.8019 0.9672 0.9857 0.4644 0.9834 0.2791 0.1169 0.6020 0.3427 Columns 10 through 18 0.3979 0.6863 0.0345 0.3044 0.2558 0.3777 0.4681 0.6272 0.3450 Columns 19 through 27 0.6976 0.9562 0.1516 0.5715 0.9090 0.9784 0.1018 0.5612 0.8501 Columns 28 through 36 0.8621 0.0078 0.5922 0.3685 0.5818 0.6063 0.7431 0.6329 0.0090 Columns 37 through 45 0.6571 0.3544 0.4662 0.7122 0.3329 0.2022 0.6804 0.0371 0.5341 Columns 46 through 50 0.3761 0.4465 0.1381 0.8385 0.4920

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