Cody

Solution 1845181

Submitted on 10 Jun 2019 by Lily Sheets
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.0889 0.1811 0.0831 0.6184 0.6317

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.1676 0.5323 0.8366 0.1169 0.4410 0.2056 0.5814 0.6926 0.5235 0.9765 0.7875 0.4313 0.5939 0.2425 0.4218 0.5906 0.1944 0.6362 Columns 19 through 36 0.3694 0.0714 0.8092 0.8018 0.9969 0.0786 0.2584 0.7730 0.5028 0.5236 0.4182 0.7959 0.4964 0.5232 0.4707 0.7383 0.2758 0.5584 Columns 37 through 50 0.3381 0.4655 0.9783 0.2726 0.0959 0.5295 0.3927 0.6211 0.3170 0.4580 0.1921 0.6207 0.5100 0.7812

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'