Cody

Solution 1959317

Submitted on 4 Oct 2019 by Matej Pulec
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.7014 0.4178 0.5017 0.8674 0.5164

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.0501 0.2372 0.7110 0.4504 0.5810 0.0200 0.4706 0.6233 0.3839 0.9729 0.7072 0.5854 0.7034 0.2106 0.7808 0.7759 0.3315 0.4745 Columns 19 through 36 0.5352 0.6413 0.3572 0.9209 0.5729 0.5512 0.0311 0.9600 0.3059 0.6956 0.9667 0.2533 0.2577 0.3413 0.6194 0.1164 0.5842 0.5924 Columns 37 through 50 0.1876 0.3145 0.2501 0.3723 0.7919 0.7992 0.2308 0.9456 0.7757 0.7506 0.2736 0.8599 0.4409 0.8143

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'