Cody

Solution 9001

Submitted on 27 Jan 2012 by Mario
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

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.4505 0.2290 0.1524 0.5383 0.0782

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

y = Columns 1 through 6 0.1067 0.0046 0.8173 0.0844 0.2599 0.4314 Columns 7 through 12 0.1818 0.1455 0.8693 0.5499 0.8530 0.3510 Columns 13 through 18 0.4018 0.2399 0.1839 0.4173 0.9027 0.4909 Columns 19 through 24 0.3377 0.3692 0.7803 0.2417 0.0965 0.9421 Columns 25 through 30 0.5752 0.2348 0.8212 0.0430 0.6491 0.6477 Columns 31 through 36 0.5470 0.7447 0.6868 0.3685 0.7802 0.9294 Columns 37 through 42 0.4868 0.4468 0.5085 0.8176 0.6443 0.8116 Columns 43 through 48 0.3507 0.8759 0.6225 0.2077 0.4709 0.8443 Columns 49 through 50 0.2259 0.2277

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