Cody

Solution 1876115

Submitted on 16 Jul 2019 by Gregory Bond
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.1663 0.0288 0.2725 0.5716 0.7597

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.7050 0.0848 0.0017 0.7680 0.0231 0.5235 0.9006 0.4631 0.2824 0.3230 0.9362 0.5002 0.8906 0.0482 0.6871 0.2016 0.1989 0.7262 Columns 19 through 36 0.2392 0.1101 0.1341 0.2951 0.7724 0.8250 0.4645 0.6351 0.7307 0.8094 0.9458 0.0667 0.2768 0.7622 0.4240 0.9981 0.9814 0.8757 Columns 37 through 50 0.7005 0.1130 0.9730 0.9965 0.5002 0.3641 0.2769 0.0594 0.6517 0.5636 0.5389 0.4257 0.1099 0.9271

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'