Cody

Solution 1943823

Submitted on 20 Sep 2019 by Atli Freyr Magnússon
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.8882 y = 0.8882 0.9989 y = 0.8882 0.9989 0.6077 y = 0.8882 0.9989 0.6077 0.2826 y = 0.8882 0.9989 0.6077 0.2826 0.7092

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

y = 0.4213 y = 0.4213 0.5237 y = 0.4213 0.5237 0.6465 y = 0.4213 0.5237 0.6465 0.4581 y = 0.4213 0.5237 0.6465 0.4581 0.3970 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 y = 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Column 19 0.1394 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 20 0.1394 0.0433 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 21 0.1394 0.0433 0.6159 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 22 0.1394 0.0433 0.6159 0.6966 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 23 0.1394 0.0433 0.6159 0.6966 0.9586 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 24 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 25 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 26 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 27 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 28 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 29 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 30 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 31 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 32 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 33 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 34 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 0.9674 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 35 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 0.9674 0.2789 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 36 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 0.9674 0.2789 0.0841 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 36 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 0.9674 0.2789 0.0841 Column 37 0.9384 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 36 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 0.9674 0.2789 0.0841 Columns 37 through 38 0.9384 0.1867 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 36 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 0.9674 0.2789 0.0841 Columns 37 through 39 0.9384 0.1867 0.7839 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 36 0.1394 0.0433 0.6159 0.6966 0.9586 0.6220 0.8508 0.4896 0.5199 0.9951 0.0703 0.4122 0.5265 0.9516 0.1554 0.9674 0.2789 0.0841 Columns 37 through 40 0.9384 0.1867 0.7839 0.4491 y = Columns 1 through 18 0.4213 0.5237 0.6465 0.4581 0.3970 0.5889 0.6129 0.5250 0.7352 0.5908 0.0524 0.8871 0.2077 0.6362 0.1442 0.3849 0.0190 0.0347 Columns 19 through 36 0.1394 0.0433 0.6159 0.69...

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'

Suggested Problems

More from this Author95