Cody

Solution 896154

Submitted on 26 May 2016 by Joe Smith
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.3521 0.2376 0.2651 0.2636 0.1439

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.2555 0.8999 0.7549 0.9344 0.8866 0.9555 0.0086 0.1845 0.7101 Columns 10 through 18 0.6755 0.2252 0.9212 0.5923 0.1583 0.8481 0.3366 0.0449 0.7168 Columns 19 through 27 0.3887 0.0354 0.3390 0.9909 0.1549 0.5700 0.7793 0.1495 0.8911 Columns 28 through 36 0.5023 0.5590 0.0620 0.5943 0.6676 0.6452 0.2486 0.4897 0.4630 Columns 37 through 45 0.8182 0.1309 0.5491 0.5409 0.4392 0.0567 0.4622 0.4325 0.9179 Columns 46 through 50 0.6276 0.0356 0.6337 0.3213 0.3784

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