Cody

Solution 1909822

Submitted on 23 Aug 2019 by Felix Wetzig
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.5755 0.9956 0.9584 0.9509 0.3141

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.2329 0.8482 0.2422 0.1799 0.4323 0.4310 0.8735 0.5300 0.1976 0.4441 0.3775 0.5934 0.5885 0.1019 0.3998 0.6508 0.4510 0.4808 Columns 19 through 36 0.2330 0.7384 0.1378 0.8115 0.5325 0.9112 0.3005 0.9394 0.6487 0.1043 0.6303 0.5323 0.1921 0.0629 0.2509 0.5975 0.7439 0.4845 Columns 37 through 50 0.9942 0.9962 0.2449 0.4307 0.5265 0.9011 0.0489 0.0006 0.4377 0.9292 0.8836 0.9270 0.3717 0.0479

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