Cody

Solution 1851252

Submitted on 17 Jun 2019 by John Gardner
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.6682 0.7819 0.2731 0.9880 0.4083

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.7319 0.3551 0.5458 0.8938 0.3024 0.5614 0.0413 0.1767 0.9326 0.5462 0.3300 0.2573 0.5641 0.6535 0.1796 0.6915 0.4778 0.8982 Columns 19 through 36 0.8690 0.1366 0.4612 0.2278 0.3319 0.6007 0.4619 0.8738 0.7931 0.5441 0.6971 0.1549 0.2881 0.5585 0.0526 0.0446 0.0820 0.5882 Columns 37 through 50 0.2316 0.4728 0.6254 0.0791 0.7772 0.8799 0.7219 0.6818 0.5054 0.9278 0.8808 0.5701 0.5797 0.2453

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'