Cody

Solution 116816

Submitted on 21 Jul 2012 by Dimosthenis
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.1533 0.5142 0.8743 0.2545 0.9060

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

y = Columns 1 through 6 0.3565 0.5709 0.1737 0.8962 0.1119 0.2256 Columns 7 through 12 0.5711 0.6448 0.4498 0.0159 0.3675 0.7595 Columns 13 through 18 0.7169 0.1621 0.1010 0.8588 0.9744 0.0511 Columns 19 through 24 0.0521 0.7386 0.5763 0.8539 0.9551 0.1868 Columns 25 through 30 0.6602 0.1592 0.3887 0.2276 0.6902 0.6287 Columns 31 through 36 0.9449 0.6773 0.8071 0.8985 0.5731 0.7723 Columns 37 through 42 0.6956 0.5738 0.9024 0.4713 0.6878 0.2668 Columns 43 through 48 0.8598 0.8014 0.8611 0.5254 0.0493 0.8164 Columns 49 through 50 0.5256 0.6466

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