Cody

Solution 982801

Submitted on 25 Sep 2016 by Omar Abedalrahman
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.1303 0.9374 0.5163 0.4943 0.0795

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.1901 0.2347 0.7888 0.2968 0.5450 0.5443 0.5655 0.2647 0.5651 Columns 10 through 18 0.1761 0.9087 0.1772 0.1636 0.6724 0.7166 0.5612 0.3626 0.1639 Columns 19 through 27 0.5118 0.5998 0.0788 0.2929 0.5971 0.4936 0.0678 0.6978 0.8762 Columns 28 through 36 0.3629 0.6972 0.3886 0.5665 0.0306 0.2329 0.5355 0.2214 0.5042 Columns 37 through 45 0.0560 0.7014 0.9613 0.5140 0.3867 0.4651 0.9810 0.5497 0.8165 Columns 46 through 50 0.0918 0.1767 0.0052 0.9492 0.3744

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

Suggested Problems

More from this Author95