Cody

Solution 981777

Submitted on 24 Sep 2016 by Matteo Malacarne
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.4393 y = 0.4393 0.4705 y = 0.4393 0.4705 0.8868 y = 0.4393 0.4705 0.8868 0.6047 y = 0.4393 0.4705 0.8868 0.6047 0.8926

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

y = 0.9204 y = 0.9204 0.2041 y = 0.9204 0.2041 0.0145 y = 0.9204 0.2041 0.0145 0.8535 y = 0.9204 0.2041 0.0145 0.8535 0.7968 y = 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 y = 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 y = 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 y = 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Column 10 0.0022 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 11 0.0022 0.6088 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 12 0.0022 0.6088 0.5399 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 13 0.0022 0.6088 0.5399 0.0590 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 14 0.0022 0.6088 0.5399 0.0590 0.9355 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 15 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 16 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 17 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Column 19 0.9195 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 20 0.9195 0.3152 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 21 0.9195 0.3152 0.2098 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 22 0.9195 0.3152 0.2098 0.8760 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 23 0.9195 0.3152 0.2098 0.8760 0.3848 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 24 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 25 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 26 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Column 28 0.5206 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 29 0.5206 0.8442 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 30 0.5206 0.8442 0.7763 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 31 0.5206 0.8442 0.7763 0.3212 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 32 0.5206 0.8442 0.7763 0.3212 0.9366 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 33 0.5206 0.8442 0.7763 0.3212 0.9366 0.2248 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 34 0.5206 0.8442 0.7763 0.3212 0.9366 0.2248 0.6967 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 35 0.5206 0.8442 0.7763 0.3212 0.9366 0.2248 0.6967 0.9205 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 36 0.5206 0.8442 0.7763 0.3212 0.9366 0.2248 0.6967 0.9205 0.8178 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 36 0.5206 0.8442 0.7763 0.3212 0.9366 0.2248 0.6967 0.9205 0.8178 Column 37 0.0778 y = Columns 1 through 9 0.9204 0.2041 0.0145 0.8535 0.7968 0.0200 0.8584 0.4753 0.3072 Columns 10 through 18 0.0022 0.6088 0.5399 0.0590 0.9355 0.4951 0.1423 0.1352 0.3195 Columns 19 through 27 0.9195 0.3152 0.2098 0.8760 0.3848 0.3798 0.4398 0.7102 0.0498 Columns 28 through 36 0.5206 0.8442 0.7763 0.3212 0.9366 0.2248 0.6967 0.9205 0.8178 Columns 37 through 38 0.0778 0....

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