Cody

Solution 1705844

Submitted on 10 Jan 2019 by Matthew Wilson
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))

0.5183 0.6420 0.4929 0.1469 0.7865

2   Pass
x = rand(1,100); actual = everyOther(x); expected = x(1:2:length(x)); assert(isequal(actual, expected))

Columns 1 through 17 0.0641 0.3698 0.1437 0.9335 0.7601 0.7562 0.7535 0.9133 0.4987 0.9623 0.1660 0.0014 0.0049 0.9887 0.7273 0.6674 0.2591 Columns 18 through 34 0.6277 0.1811 0.0932 0.4416 0.5945 0.6796 0.0149 0.3738 0.6896 0.9422 0.2825 0.4969 0.1928 0.2014 0.7420 0.5035 0.9830 Columns 35 through 50 0.2228 0.7734 0.6225 0.0882 0.2296 0.0129 0.5016 0.0616 0.9190 0.9748 0.0147 0.7068 0.9634 0.6500 0.1172 0.3279

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))

Aogiegiaaayafrwy