Cody

Solution 1661097

Submitted on 28 Oct 2018 by farshad ghiasvand
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))

r = 1 w = 10 m = 5 y = 0.1827 y = 0.1827 0.4069 y = 0.1827 0.4069 0.2401 y = 0.1827 0.4069 0.2401 0.2654 y = 0.1827 0.4069 0.2401 0.2654 0.3703

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

r = 1 w = 100 m = 50 y = 0.2563 y = 0.2563 0.6685 y = 0.2563 0.6685 0.5778 y = 0.2563 0.6685 0.5778 0.6292 y = 0.2563 0.6685 0.5778 0.6292 0.9564 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 y = 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Column 18 0.4404 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 19 0.4404 0.9962 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 20 0.4404 0.9962 0.4351 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 21 0.4404 0.9962 0.4351 0.9791 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 22 0.4404 0.9962 0.4351 0.9791 0.4484 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 23 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 24 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 25 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 26 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 27 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 28 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 29 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 30 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 31 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 32 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 33 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 0.8283 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 0.8283 Column 35 0.4971 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 0.8283 Columns 35 through 36 0.4971 0.7647 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 0.8283 Columns 35 through 37 0.4971 0.7647 0.9403 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 0.8283 Columns 35 through 38 0.4971 0.7647 0.9403 0.1323 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 0.8283 Columns 35 through 39 0.4971 0.7647 0.9403 0.1323 0.3771 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 0.3613 0.8398 0.3556 0.4897 0.6335 0.8283 Columns 35 through 40 0.4971 0.7647 0.9403 0.1323 0.3771 0.5254 y = Columns 1 through 17 0.2563 0.6685 0.5778 0.6292 0.9564 0.9629 0.2413 0.3173 0.3187 0.7886 0.6725 0.4165 0.4207 0.7860 0.9543 0.4049 0.4431 Columns 18 through 34 0.4404 0.9962 0.4351 0.9791 0.4484 0.3796 0.7840 0.7885 0.1473 0.8807 0.7167 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))

r = 1 w = 31 m = 16 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'