Cody

Solution 2013088

Submitted on 11 Nov 2019 by Braden Baird
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.0744 0.4171 0.9264 0.9650 0.3115

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.6224 0.7649 0.0035 0.5963 0.3506 0.1340 0.9541 0.3089 0.9726 0.1700 0.1419 0.2184 0.3118 0.7608 0.1787 0.0910 0.3296 0.0634 Columns 19 through 36 0.2846 0.1400 0.8485 0.9783 0.1845 0.1043 0.6192 0.3448 0.2063 0.1315 0.7797 0.0253 0.4867 0.3825 0.9012 0.8446 0.7647 0.8919 Columns 37 through 50 0.7537 0.0621 0.9213 0.3925 0.2634 0.1163 0.2570 0.6360 0.6903 0.3416 0.2942 0.5509 0.3336 0.1924

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'