Cody

Solution 83323

Submitted on 27 Apr 2012 by Brett Shoelson
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.6399 0.6928 0.5321 0.1719 0.1843

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.7846 0.3401 0.5530 0.7318 0.5809 0.4462 Columns 7 through 12 0.1825 0.3244 0.6151 0.2130 0.8620 0.2926 Columns 13 through 18 0.6787 0.8632 0.4476 0.0678 0.7891 0.2729 Columns 19 through 24 0.4068 0.2492 0.6739 0.8818 0.5059 0.2200 Columns 25 through 30 0.7467 0.7973 0.5228 0.8052 0.7069 0.6826 Columns 31 through 36 0.0545 0.1469 0.7852 0.1817 0.4583 0.8952 Columns 37 through 42 0.2762 0.9508 0.5719 0.6605 0.3361 0.1363 Columns 43 through 48 0.8803 0.9086 0.2774 0.4806 0.3956 0.5510 Columns 49 through 50 0.8450 0.3528

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