Cody

Solution 1636837

Submitted on 2 Oct 2018 by Julian Hapke
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.7241 0.4159 0.9625 0.4732 0.7420

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.3430 0.6131 0.4870 0.7518 0.0478 0.6832 0.2240 0.4072 0.7685 0.2102 0.5131 0.9440 0.5125 0.7217 0.7277 0.4326 0.8191 Columns 18 through 34 0.9069 0.9723 0.3990 0.2836 0.4674 0.7757 0.7800 0.0242 0.6486 0.2476 0.5075 0.6636 0.1649 0.2265 0.1991 0.4295 0.6204 Columns 35 through 50 0.5914 0.4562 0.9355 0.6477 0.6242 0.4645 0.8494 0.4404 0.9043 0.3938 0.0201 0.5718 0.3010 0.6340 0.4889 0.0765

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'