Cody

Solution 1710981

Submitted on 21 Jan 2019 by Michaela Mitchell
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.5047 0.9102 0.7457 0.6663 0.0124

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.9743 0.7997 0.5269 0.2119 0.4771 0.2801 0.2404 0.1600 0.8989 0.3319 0.5402 0.4905 0.5664 0.2208 0.4570 0.1661 0.5980 0.4529 Columns 19 through 36 0.9644 0.9899 0.0585 0.8795 0.9784 0.0532 0.9204 0.1286 0.0474 0.9919 0.1281 0.9271 0.1038 0.7468 0.0552 0.0325 0.0800 0.5130 Columns 37 through 50 0.1739 0.9159 0.1487 0.5117 0.5412 0.5027 0.7189 0.8653 0.7772 0.5251 0.4463 0.6804 0.9260 0.0040

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