Cody

Solution 1878537

Submitted on 19 Jul 2019 by Maurice P
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.8165 0.8333 0.8904 0.4909 0.2572

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.2727 0.6725 0.8342 0.0210 0.4031 0.2235 0.5357 0.9595 0.4411 0.4453 0.1135 0.2321 0.7387 0.8769 0.0361 0.6512 0.4385 0.0749 Columns 19 through 36 0.8529 0.4460 0.9471 0.8702 0.2569 0.2940 0.9818 0.3638 0.8473 0.2850 0.7303 0.1850 0.2880 0.7430 0.9591 0.0682 0.6061 0.2313 Columns 37 through 50 0.9104 0.7088 0.4530 0.7358 0.8213 0.0517 0.8767 0.0546 0.8108 0.8198 0.9655 0.4541 0.0466 0.3589

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