Cody

Solution 1890785

Submitted on 2 Aug 2019 by Michael Tadros
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.2119 0.1819 0.6292 0.5007 0.3656

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.7761 0.4691 0.6967 0.5950 0.8389 0.6733 0.3931 0.5064 0.6230 0.7375 0.0175 0.7423 0.3134 0.6680 0.8159 0.2897 0.4130 0.5386 Columns 19 through 36 0.5074 0.9225 0.3777 0.0775 0.0077 0.6150 0.0335 0.4416 0.8492 0.2243 0.4222 0.5736 0.2886 0.2382 0.9885 0.2336 0.8462 0.0015 Columns 37 through 50 0.1972 0.9984 0.3471 0.2889 0.1406 0.5959 0.6515 0.0228 0.9470 0.7158 0.5956 0.4143 0.9299 0.3164

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'