Cody

Solution 2159812

Submitted on 14 Mar 2020 by Nabil Miri
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))

0.1674 0.2286 0.2062 0.3021 0.6047

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

Columns 1 through 18 0.2712 0.5955 0.8171 0.5079 0.9230 0.0905 0.7344 0.0528 0.3897 0.4743 0.4955 0.9323 0.9766 0.7702 0.2075 0.1158 0.8191 0.6091 Columns 19 through 36 0.2434 0.3196 0.8725 0.7484 0.1923 0.6853 0.3419 0.9907 0.4213 0.4560 0.8795 0.4424 0.6081 0.9683 0.9355 0.7639 0.5654 0.1187 Columns 37 through 50 0.7324 0.7505 0.6837 0.8732 0.8628 0.5171 0.8013 0.1471 0.2788 0.8542 0.0485 0.7241 0.3292 0.8044

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))

Aogiegiaaayafrwy