Cody

Solution 1360915

Submitted on 28 Nov 2017 by Jill
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.1641 y = 0.1641 0.2864 y = 0.1641 0.2864 0.7291 y = 0.1641 0.2864 0.7291 0.3405 y = 0.1641 0.2864 0.7291 0.3405 0.8107

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

y = 0.2270 y = 0.2270 0.6336 y = 0.2270 0.6336 0.3530 y = 0.2270 0.6336 0.3530 0.4200 y = 0.2270 0.6336 0.3530 0.4200 0.8874 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 y = 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Column 19 0.8629 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 20 0.8629 0.5611 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 21 0.8629 0.5611 0.3284 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 22 0.8629 0.5611 0.3284 0.7018 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 23 0.8629 0.5611 0.3284 0.7018 0.8524 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 24 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 25 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 26 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 27 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 28 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 29 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 30 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 31 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 32 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 33 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 34 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 0.3589 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 35 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 0.3589 0.3650 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 36 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 0.3589 0.3650 0.8423 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 36 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 0.3589 0.3650 0.8423 Column 37 0.4899 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 36 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 0.3589 0.3650 0.8423 Columns 37 through 38 0.4899 0.9446 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 36 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 0.3589 0.3650 0.8423 Columns 37 through 39 0.4899 0.9446 0.8169 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 36 0.8629 0.5611 0.3284 0.7018 0.8524 0.0224 0.1120 0.5291 0.6228 0.1034 0.7561 0.7584 0.3525 0.0799 0.5030 0.3589 0.3650 0.8423 Columns 37 through 40 0.4899 0.9446 0.8169 0.7542 y = Columns 1 through 18 0.2270 0.6336 0.3530 0.4200 0.8874 0.4147 0.3957 0.2448 0.5763 0.0766 0.0397 0.9433 0.1429 0.4755 0.9980 0.4364 0.5710 0.4727 Columns 19 through 36 0.8629 0.5611 0.3284 0.70...

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'