Cody

Solution 1644044

Submitted on 12 Oct 2018 by Juan Chervatin
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 = [] y = 0.5487 y = 0.5487 0.6675 y = 0.5487 0.6675 0.8986 y = 0.5487 0.6675 0.8986 0.3463 y = 0.5487 0.6675 0.8986 0.3463 0.2483

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

y = [] y = 0.4505 y = 0.4505 0.2237 y = 0.4505 0.2237 0.6488 y = 0.4505 0.2237 0.6488 0.5197 y = 0.4505 0.2237 0.6488 0.5197 0.4899 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 y = 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Column 18 0.6838 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 19 0.6838 0.2202 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 20 0.6838 0.2202 0.2240 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 21 0.6838 0.2202 0.2240 0.3857 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 22 0.6838 0.2202 0.2240 0.3857 0.1979 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 23 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 24 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 25 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 26 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 27 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 28 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 29 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 30 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 31 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 32 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 33 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 34 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 0.7617 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 34 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 0.7617 Column 35 0.9337 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 34 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 0.7617 Columns 35 through 36 0.9337 0.2073 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 34 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 0.7617 Columns 35 through 37 0.9337 0.2073 0.7245 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 34 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 0.7617 Columns 35 through 38 0.9337 0.2073 0.7245 0.7259 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 34 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 0.7617 Columns 35 through 39 0.9337 0.2073 0.7245 0.7259 0.1529 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 0.2929 0.3890 0.7054 0.3314 0.0953 Columns 18 through 34 0.6838 0.2202 0.2240 0.3857 0.1979 0.9823 0.1329 0.7056 0.1767 0.3617 0.9740 0.3610 0.6146 0.3924 0.9005 0.6874 0.7617 Columns 35 through 40 0.9337 0.2073 0.7245 0.7259 0.1529 0.0006 y = Columns 1 through 17 0.4505 0.2237 0.6488 0.5197 0.4899 0.1177 0.5216 0.7023 0.5873 0.3042 0.8808 0.8490 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 = [] 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'