Cody

Solution 1853939

Submitted on 20 Jun 2019 by Johan Cuperus
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.6119 y = 0.6119 0.3274 y = 0.6119 0.3274 0.6975 y = 0.6119 0.3274 0.6975 0.1283 y = 0.6119 0.3274 0.6975 0.1283 0.0989

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

y = 0.8214 y = 0.8214 0.6561 y = 0.8214 0.6561 0.9863 y = 0.8214 0.6561 0.9863 0.9942 y = 0.8214 0.6561 0.9863 0.9942 0.7511 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 y = 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Column 19 0.1090 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 20 0.1090 0.7707 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 21 0.1090 0.7707 0.0229 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 22 0.1090 0.7707 0.0229 0.4030 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 23 0.1090 0.7707 0.0229 0.4030 0.0621 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 24 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 25 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 26 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 27 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 28 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 29 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 30 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 31 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 32 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 33 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 34 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 0.2220 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 35 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 0.2220 0.4278 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 36 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 0.2220 0.4278 0.9376 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 36 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 0.2220 0.4278 0.9376 Column 37 0.6369 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 36 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 0.2220 0.4278 0.9376 Columns 37 through 38 0.6369 0.8414 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 36 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 0.2220 0.4278 0.9376 Columns 37 through 39 0.6369 0.8414 0.6007 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 36 0.1090 0.7707 0.0229 0.4030 0.0621 0.0927 0.2750 0.9681 0.6375 0.2723 0.6290 0.6827 0.5190 0.3282 0.9962 0.2220 0.4278 0.9376 Columns 37 through 40 0.6369 0.8414 0.6007 0.2640 y = Columns 1 through 18 0.8214 0.6561 0.9863 0.9942 0.7511 0.7734 0.0022 0.2524 0.6980 0.0503 0.9118 0.6421 0.1660 0.9845 0.4360 0.7957 0.5814 0.9576 Columns 19 through 36 0.1090 0.7707 0.0229 0.40...

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 = 'A' y = 'Ao' y = 'Aog' y = 'Aogi' y = 'Aogie' y = 'Aogieg' y = 'Aogiegi' y = 'Aogiegia' y = 'Aogiegiaa' y = 'Aogiegiaaa' y = 'Aogiegiaaay' y = 'Aogiegiaaaya' y = 'Aogiegiaaayaf' y = 'Aogiegiaaayafr' y = 'Aogiegiaaayafrw' y = 'Aogiegiaaayafrwy'