Cody

Solution 2077462

Submitted on 3 Jan 2020 by Vaishnavi Chakradeo
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.2780 0.6271 0.4025 0.6864 0.6265

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

y = Columns 1 through 17 0.3664 0.2804 0.3405 0.8717 0.0757 0.4286 0.0732 0.6939 0.6115 0.1973 0.0731 0.7627 0.6813 0.2735 0.5884 0.0680 0.6083 Columns 18 through 34 0.1727 0.3552 0.3470 0.2722 0.6885 0.5777 0.0613 0.9635 0.7756 0.7382 0.4471 0.2404 0.1791 0.7097 0.4385 0.6048 0.6123 Columns 35 through 50 0.3672 0.3292 0.5920 0.4182 0.1943 0.3732 0.6384 0.1152 0.2544 0.1229 0.1291 0.6846 0.7488 0.1931 0.1157 0.8986

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'