Cody

Solution 914130

Submitted on 23 Jun 2016 by Simon Efinger
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.4180 0.4152 0.3918 0.8684 0.2649

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.7041 0.7251 0.8151 0.1833 0.3078 0.7933 0.9223 0.8950 0.0010 Columns 10 through 18 0.3008 0.4391 0.2369 0.7502 0.1928 0.8690 0.1940 0.5576 0.4410 Columns 19 through 27 0.1979 0.3124 0.0583 0.0289 0.6137 0.8912 0.2817 0.3129 0.4281 Columns 28 through 36 0.1427 0.5035 0.8011 0.7552 0.6482 0.6926 0.6757 0.0473 0.6292 Columns 37 through 45 0.2539 0.3593 0.8812 0.6344 0.9416 0.2240 0.7838 0.2003 0.8164 Columns 46 through 50 0.7811 0.6367 0.3095 0.3550 0.3468

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