Cody

Solution 351869

Submitted on 15 Nov 2013 by Cesar
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.7047 0.6622 0.9097 0.1582 0.5229

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

y = Columns 1 through 10 0.6347 0.3664 0.9016 0.0885 0.7917 0.1330 0.1308 0.5147 0.8229 0.9425 Columns 11 through 20 0.2480 0.5259 0.0956 0.9886 0.8296 0.6124 0.7916 0.2755 0.1021 0.3493 Columns 21 through 30 0.6936 0.9386 0.9609 0.0682 0.2607 0.3701 0.3967 0.2363 0.8828 0.1999 Columns 31 through 40 0.5329 0.8517 0.7334 0.4666 0.0727 0.6795 0.8475 0.0907 0.1135 0.6966 Columns 41 through 50 0.7444 0.5093 0.9917 0.1817 0.5469 0.6187 0.5371 0.2778 0.2846 0.5528

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