Cody

Solution 1811374

Submitted on 9 May 2019 by Ashley Namini
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.7070 0.4176 0.2828 0.2801 0.6411

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

y = Columns 1 through 18 0.7937 0.7977 0.6645 0.6654 0.1318 0.5758 0.1079 0.7664 0.8409 0.3003 0.4000 0.6037 0.0757 0.1502 0.7926 0.5156 0.6407 0.9206 Columns 19 through 36 0.8087 0.3376 0.4301 0.8453 0.1521 0.7432 0.2059 0.6340 0.2680 0.5193 0.0432 0.5873 0.0383 0.1009 0.6508 0.1981 0.3643 0.5033 Columns 37 through 50 0.4837 0.7963 0.6752 0.3948 0.2005 0.5134 0.9054 0.7799 0.2837 0.9035 0.8477 0.4263 0.1839 0.6997

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'