Cody

Solution 2065738

Submitted on 21 Dec 2019 by Jude Alnas
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.0655 0.4774 0.7260 0.3445 0.2607

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

y = Columns 1 through 18 0.1131 0.4408 0.0484 0.0596 0.7255 0.6196 0.8582 0.9294 0.4967 0.2393 0.0542 0.9899 0.3562 0.6390 0.9007 0.6527 0.9652 0.5819 Columns 19 through 36 0.9054 0.5114 0.1178 0.6396 0.8817 0.5149 0.4327 0.5554 0.9367 0.6059 0.4796 0.4033 0.6382 0.4209 0.8785 0.9564 0.8546 0.9585 Columns 37 through 50 0.7758 0.1034 0.0294 0.1820 0.1362 0.1757 0.3189 0.4113 0.3861 0.0130 0.1368 0.0019 0.1094 0.5626

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