Cody

Solution 234555

Submitted on 23 Apr 2013 by Sheldon
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.1270 y = 0.1270 0.6324 y = 0.1270 0.6324 0.2785 y = 0.1270 0.6324 0.2785 0.9575 y = 0.1270 0.6324 0.2785 0.9575 0.1576

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

y = 0.9572 y = 0.9572 0.8003 y = 0.9572 0.8003 0.4218 y = 0.9572 0.8003 0.4218 0.7922 y = 0.9572 0.8003 0.4218 0.7922 0.6557 y = 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 y = 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 y = 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 y = 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 y = 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Column 11 0.2769 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 12 0.2769 0.0971 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 13 0.2769 0.0971 0.6948 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 14 0.2769 0.0971 0.6948 0.9502 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 15 0.2769 0.0971 0.6948 0.9502 0.4387 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 16 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 17 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 18 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 19 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Column 21 0.6551 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 22 0.6551 0.1190 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 23 0.6551 0.1190 0.9597 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 24 0.6551 0.1190 0.9597 0.5853 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 25 0.6551 0.1190 0.9597 0.5853 0.7513 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 26 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 27 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 28 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 29 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Column 31 0.8143 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 32 0.8143 0.9293 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 33 0.8143 0.9293 0.1966 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 34 0.8143 0.9293 0.1966 0.6160 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 35 0.8143 0.9293 0.1966 0.6160 0.3517 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 36 0.8143 0.9293 0.1966 0.6160 0.3517 0.5853 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 37 0.8143 0.9293 0.1966 0.6160 0.3517 0.5853 0.9172 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 38 0.8143 0.9293 0.1966 0.6160 0.3517 0.5853 0.9172 0.7572 y = Columns 1 through 10 0.9572 0.8003 0.4218 0.7922 0.6557 0.8491 0.6787 0.7431 0.6555 0.7060 Columns 11 through 20 0.2769 0.0971 0.6948 0.9502 0.4387 0.7655 0.1869 0.4456 0.7094 0.2760 Columns 21 through 30 0.6551 0.1190 0.9597 0.5853 0.7513 0.5060 0.8909 0.5472 0.1493 0.8407 Columns 31 through 39 0.8143 0.9293 0.1966 0.616...

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