Cody

Solution 1879804

Submitted on 20 Jul 2019 by Dillon Bradley
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.0128 0.4398 0.3535 0.0602 0.7068

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.2615 0.1458 0.9426 0.5208 0.9976 0.4548 0.3663 0.1483 0.3756 0.0192 0.4834 0.0331 0.2253 0.6944 0.7122 0.3578 0.3235 0.0038 Columns 19 through 36 0.3304 0.9070 0.0587 0.2601 0.3800 0.7657 0.9078 0.1251 0.1154 0.4753 0.2369 0.2283 0.4698 0.2430 0.3704 0.0596 0.6111 0.9598 Columns 37 through 50 0.9710 0.8060 0.8915 0.4245 0.2776 0.7454 0.6695 0.1732 0.0749 0.6563 0.9899 0.0431 0.9444 0.2466

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'