Cody

Solution 2101018

Submitted on 21 Jan 2020 by Nataraj
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.2687 0.8655 0.8527 0.1223 0.1814

2   Pass
x = rand(1,100); actual = everyOther(x); expected = x(1:2:length(x)); assert(isequal(actual, expected))

y = Columns 1 through 17 0.9096 0.4130 0.8057 0.0838 0.3704 0.4596 0.3527 0.7566 0.4525 0.9671 0.6350 0.2433 0.8284 0.9936 0.4999 0.7074 0.2092 Columns 18 through 34 0.9902 0.0649 0.5870 0.7344 0.5766 0.7420 0.7541 0.6706 0.4653 0.8892 0.4116 0.0270 0.7035 0.7043 0.8989 0.8141 0.7865 Columns 35 through 50 0.8123 0.0215 0.0668 0.8064 0.1884 0.7189 0.3435 0.3213 0.4567 0.1732 0.5514 0.5910 0.6872 0.2211 0.7869 0.4365

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'