Cody

Solution 1615006

Submitted on 23 Aug 2018 by arif islam
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.8436 0.2179 0.9018 0.7368 0.8137

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.8075 0.1806 0.6688 0.1753 0.2054 0.4692 0.8672 0.8211 0.8574 0.3522 0.8825 0.3035 0.4097 0.5656 0.4968 0.8521 0.3826 0.0305 Columns 19 through 36 0.2572 0.4458 0.3668 0.0006 0.4724 0.9047 0.0271 0.5089 0.5170 0.4593 0.1046 0.1038 0.9051 0.5868 0.2442 0.0620 0.7983 0.0366 Columns 37 through 50 0.6936 0.1446 0.8861 0.5414 0.2805 0.7051 0.7594 0.9713 0.3494 0.2791 0.8865 0.7933 0.2173 0.8199

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'

Suggested Problems

More from this Author95