Cody

Solution 2100564

Submitted on 21 Jan 2020 by Yee Hin Chong
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.9641 0.3266 0.5382 0.7619 0.5431

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.1996 0.2227 0.2154 0.0040 0.5261 0.6152 0.3606 0.2498 0.5800 0.7070 0.2022 0.2392 0.8100 0.6972 0.8840 0.3456 0.7793 0.7797 Columns 19 through 36 0.9459 0.5736 0.5091 0.0482 0.8050 0.8759 0.1367 0.1203 0.2396 0.4958 0.5277 0.9715 0.9822 0.2207 0.5068 0.2016 0.9174 0.9902 Columns 37 through 50 0.5360 0.4796 0.2038 0.3691 0.3126 0.8285 0.7271 0.8313 0.4985 0.8076 0.9773 0.5419 0.2408 0.3975

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'