Cody

Solution 1028919

Submitted on 24 Oct 2016 by Dan Po
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.7487 0.7123 0.8645 0.1474 0.6642

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.1182 0.9742 0.7930 0.3006 0.4343 0.1855 0.6953 0.1892 0.1224 Columns 10 through 18 0.4065 0.3995 0.6386 0.7684 0.5090 0.7530 0.1521 0.7294 0.1055 Columns 19 through 27 0.1505 0.0468 0.8173 0.3112 0.0696 0.9371 0.8858 0.5308 0.7195 Columns 28 through 36 0.6994 0.5975 0.9600 0.9962 0.4303 0.0926 0.7452 0.7853 0.5661 Columns 37 through 45 0.6032 0.4182 0.9031 0.0544 0.3622 0.5323 0.3706 0.0446 0.5383 Columns 46 through 50 0.9325 0.5551 0.1992 0.7114 0.7168

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

Suggested Problems

More from this Author95