Cody

Solution 1974236

Submitted on 13 Oct 2019 by Joseph Chambers
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.8410 0.0160 0.0280 0.1441 0.4853

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.2863 0.6228 0.7487 0.9920 0.9468 0.6867 0.0058 0.7086 0.5863 0.0960 0.3354 0.3140 0.9361 0.8244 0.7708 0.7946 0.6447 0.7337 Columns 19 through 36 0.6013 0.2040 0.5154 0.4899 0.4477 0.8096 0.2654 0.2574 0.9973 0.3861 0.8818 0.9907 0.5216 0.4008 0.4705 0.8052 0.4757 0.8495 Columns 37 through 50 0.0606 0.4801 0.7698 0.8366 0.5874 0.7467 0.2676 0.7114 0.1114 0.9353 0.8918 0.2803 0.2189 0.4311

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'