Cody

Solution 683054

Submitted on 8 Jun 2015 by Brandon Popper
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.1296 0.0877 0.3491 0.8189 0.3248

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

y = Columns 1 through 9 0.3103 0.8504 0.6854 0.4491 0.7918 0.5779 0.2199 0.1420 0.5777 Columns 10 through 18 0.3334 0.6879 0.3751 0.2929 0.7005 0.7302 0.6959 0.3451 0.3428 Columns 19 through 27 0.4909 0.7606 0.7824 0.7135 0.7445 0.2307 0.4246 0.5757 0.2074 Columns 28 through 36 0.5264 0.5947 0.7373 0.3084 0.4512 0.5458 0.5548 0.0469 0.0890 Columns 37 through 45 0.0746 0.3326 0.9396 0.9403 0.5867 0.7624 0.3330 0.0726 0.6232 Columns 46 through 50 0.6569 0.5076 0.5282 0.7963 0.4698

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

More from this Author95