Cody

Solution 1738827

Submitted on 28 Feb 2019 by Pranav Jonnavithula
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.8974 0.1621 0.8272 0.9163 0.4145

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.8676 0.1591 0.0193 0.9886 0.0662 0.9449 0.0487 0.9797 0.2262 0.8053 0.4607 0.4769 0.3430 0.2245 0.5491 0.2559 0.7485 Columns 18 through 34 0.9703 0.9371 0.9480 0.0056 0.0630 0.1819 0.8689 0.6713 0.6637 0.2690 0.0815 0.8276 0.2182 0.3292 0.4039 0.4852 0.4417 Columns 35 through 50 0.1937 0.8896 0.3965 0.5511 0.8526 0.8099 0.1087 0.3626 0.0313 0.1270 0.9286 0.5847 0.2332 0.4387 0.4809 0.6751

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'

Suggested Problems