Cody

Solution 1917860

Submitted on 1 Sep 2019 by Alvin LAU
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.1004 0.4168 0.5614 0.9582 0.4348

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.9141 0.9381 0.3721 0.4070 0.3655 0.5295 0.4435 0.2455 0.0117 0.0639 0.4681 0.5416 0.4716 0.4281 0.6405 0.4379 0.6533 0.1979 Columns 19 through 36 0.6222 0.6556 0.6737 0.2537 0.0807 0.1266 0.9909 0.8504 0.8244 0.8826 0.2991 0.3336 0.0344 0.6119 0.9115 0.5655 0.2776 0.6078 Columns 37 through 50 0.6654 0.0458 0.2125 0.2775 0.7973 0.7163 0.6225 0.6879 0.5225 0.1201 0.0817 0.9342 0.7281 0.7203

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'