Cody

Solution 2093835

Submitted on 15 Jan 2020 by Ewan
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.5535 0.7586 0.4997 0.3375 0.5442

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.5905 0.4298 0.8938 0.8537 0.8540 0.4680 0.0392 0.1561 0.7697 0.6782 0.1444 0.4275 0.8825 0.7315 0.5562 0.9034 0.6361 0.3416 Columns 19 through 36 0.7056 0.0004 0.1475 0.5510 0.8883 0.2146 0.0205 0.5294 0.9114 0.2105 0.3597 0.7088 0.2543 0.7014 0.3674 0.3570 0.9270 0.1832 Columns 37 through 50 0.1568 0.3278 0.5658 0.8675 0.3066 0.3955 0.1440 0.6166 0.5815 0.2780 0.1573 0.7374 0.8402 0.5607

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