Cody

Solution 1089373

Submitted on 25 Dec 2016 by Hassan Jumail
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.6014 0.7413 0.0686 0.9537 0.9131

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

y = Columns 1 through 9 0.9565 0.6075 0.8635 0.1505 0.3508 0.8846 0.3695 0.7702 0.4792 Columns 10 through 18 0.7576 0.3662 0.4591 0.9333 0.3959 0.3377 0.0820 0.4987 0.8498 Columns 19 through 27 0.9976 0.5356 0.3068 0.4800 0.9637 0.5631 0.2999 0.2407 0.1745 Columns 28 through 36 0.3788 0.2494 0.5736 0.5528 0.8537 0.0956 0.0299 0.0011 0.8374 Columns 37 through 45 0.3331 0.5438 0.9493 0.1469 0.7834 0.8803 0.3236 0.3309 0.1745 Columns 46 through 50 0.3653 0.0904 0.8853 0.4770 0.5517

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 = Aogiegiaaayafrwy