Cody

Solution 1714237

Submitted on 23 Jan 2019 by Kristoffer Hollund
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.0228 0.7588 0.9640 0.3003 0.0376

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.9675 0.8074 0.6869 0.6452 0.0938 0.0863 0.0786 0.4688 0.0466 0.5242 0.8569 0.3151 0.4651 0.1028 0.7831 0.8895 0.3519 0.8378 Columns 19 through 36 0.6699 0.6529 0.7237 0.9123 0.5498 0.4844 0.8511 0.5332 0.7148 0.8398 0.7243 0.9776 0.4797 0.1887 0.6654 0.5083 0.0012 0.9330 Columns 37 through 50 0.1023 0.2044 0.8844 0.3953 0.2144 0.6445 0.8995 0.8518 0.3951 0.4713 0.4953 0.2685 0.3388 0.3828

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