Cody

Solution 2041390

Submitted on 2 Dec 2019 by Justin Sims
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.5325 0.8252 0.7155 0.4309 0.0153

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.8219 0.4436 0.2167 0.9904 0.6674 0.6621 0.9907 0.1163 0.3814 0.8004 0.0576 0.5983 0.7328 0.9490 0.1678 0.2242 0.6133 0.5810 Columns 19 through 36 0.9959 0.9069 0.1612 0.5197 0.0817 0.3693 0.2406 0.2157 0.1023 0.3538 0.8318 0.8549 0.8632 0.7975 0.0823 0.6631 0.4427 0.5307 Columns 37 through 50 0.3537 0.6472 0.9880 0.7572 0.0898 0.2415 0.1619 0.5195 0.0898 0.3263 0.7011 0.8504 0.9064 0.4177

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'