Cody

Solution 1190186

Submitted on 16 May 2017 by MathReallyWorks
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.6480 0.9171 0.1387 0.5672 0.5439

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.3247 0.1577 0.3169 0.4807 0.7234 0.9558 0.1380 0.3669 0.4019 0.9558 0.0356 0.5119 0.4727 0.2036 0.5072 0.3862 0.9816 Columns 18 through 34 0.9470 0.1562 0.2458 0.0305 0.8121 0.1745 0.2557 0.7066 0.2335 0.1919 0.3445 0.5871 0.6571 0.7135 0.2301 0.5987 0.7561 Columns 35 through 50 0.6912 0.0933 0.3765 0.3014 0.4587 0.0743 0.2984 0.0754 0.5633 0.3295 0.3750 0.0957 0.5628 0.6354 0.8831 0.5344

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'