Cody

Solution 1817372

Submitted on 16 May 2019 by PRASANNA GAWADE
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.6222 0.9108 0.1957 0.6644 0.3135

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.9953 0.4211 0.1241 0.4775 0.1853 0.7639 0.5722 0.2188 0.0741 0.1148 0.7137 0.1275 0.1430 0.2680 0.6473 0.1833 0.8739 0.9571 Columns 19 through 36 0.3792 0.3822 0.5774 0.3796 0.5412 0.4157 0.4116 0.3157 0.8335 0.0640 0.7067 0.2271 0.4860 0.0667 0.4057 0.3599 0.3308 0.4143 Columns 37 through 50 0.2767 0.8400 0.3490 0.7026 0.8760 0.9071 0.0712 0.5218 0.2258 0.5598 0.8710 0.8025 0.2209 0.6724

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'