Cody

Solution 2186058

Submitted on 1 Apr 2020 by Anchal Kariwala
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.4372 0.3256 0.2369 0.0961 0.5412

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.1537 0.1628 0.4776 0.5860 0.3138 0.6923 0.2066 0.6475 0.2097 0.5652 0.8161 0.0299 0.2631 0.0751 0.5713 0.4216 0.6254 Columns 18 through 34 0.2451 0.7145 0.8763 0.6728 0.4106 0.9488 0.6186 0.1074 0.1096 0.7956 0.2581 0.1439 0.9493 0.3241 0.9635 0.1259 0.9356 Columns 35 through 50 0.0322 0.1108 0.2954 0.1166 0.6373 0.9870 0.2824 0.1126 0.8133 0.0339 0.3814 0.0248 0.2086 0.4234 0.8868 0.5550

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'