Cody

Solution 2172206

Submitted on 24 Mar 2020 by Simon Hönes
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.6912 0.9184 0.5909 0.8387 0.5910

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.9638 0.6425 0.7127 0.3392 0.3868 0.9730 0.5325 0.0957 0.2568 0.4659 0.4853 0.1103 0.6167 0.0165 0.3963 0.0704 0.9521 0.8661 Columns 19 through 36 0.0193 0.4317 0.3094 0.2187 0.9965 0.6903 0.3936 0.0980 0.6879 0.9210 0.5215 0.0264 0.7976 0.8805 0.1296 0.5373 0.1585 0.6060 Columns 37 through 50 0.9570 0.9285 0.4852 0.5662 0.0456 0.1074 0.9530 0.4942 0.1682 0.4881 0.8944 0.1230 0.5533 0.0074

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'