Cody

Solution 1842596

Submitted on 8 Jun 2019 by Joseph Manning
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.2316 0.0675 0.6462 0.6617 0.7447

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.9131 0.8148 0.1252 0.1461 0.5422 0.7847 0.7173 0.5712 0.4315 0.6334 0.2783 0.5164 0.9676 0.4515 0.5430 0.3692 0.8788 0.5329 Columns 19 through 36 0.5384 0.6457 0.1298 0.1874 0.5502 0.5497 0.2918 0.1624 0.6632 0.9729 0.6044 0.6315 0.8296 0.1533 0.3011 0.4576 0.5325 0.1267 Columns 37 through 50 0.0755 0.5482 0.2577 0.8395 0.8114 0.1482 0.4448 0.6027 0.0748 0.4006 0.4496 0.7598 0.8219 0.2243

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'