Cody

Solution 2053010

Submitted on 10 Dec 2019 by Emer Curley
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.1225 0.9239 0.3216 0.9157 0.3209

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

y = Columns 1 through 17 0.8728 0.3453 0.4874 0.0797 0.6505 0.9054 0.9630 0.0429 0.1868 0.4804 0.1904 0.7639 0.8664 0.6420 0.1904 0.7382 0.0311 Columns 18 through 34 0.5737 0.0282 0.8568 0.4178 0.4876 0.0647 0.6761 0.3107 0.9031 0.7716 0.7973 0.8634 0.6397 0.8805 0.1800 0.5301 0.3370 Columns 35 through 50 0.8389 0.1010 0.4022 0.7312 0.7905 0.2840 0.8677 0.7764 0.9151 0.5704 0.2559 0.0624 0.4147 0.4020 0.4714 0.6838

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'