Cody

Solution 1426783

Submitted on 28 Jan 2018 by Jihye Sofia Seo
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 = [1 2 3;4 5 6;7 8 9]; y_correct = [1 3 5 7 9 8 6 4 2]' assert(isequal(vectorizeit(x),y_correct))

y_correct = 1 3 5 7 9 8 6 4 2 x = 1 2 3 4 5 6 7 8 9 even = 2 4 6 8 odd = 1 3 5 7 9 even = 8 6 4 2 odd = 1 3 5 7 9

2   Pass
x = [5 8 9 ;7 22 9]; y_correct = [5 7 9 22 8]' assert(isequal(vectorizeit(x),y_correct))

y_correct = 5 7 9 22 8 x = 5 7 8 9 22 even = 8 22 odd = 5 7 9 even = 22 8 odd = 5 7 9

3   Pass
x = [88 99; 0 64]; y_correct = [99 88 64 0]' assert(isequal(vectorizeit(x),y_correct))

y_correct = 99 88 64 0 x = 0 64 88 99 even = 0 64 88 odd = 99 even = 88 64 0 odd = 99

4   Pass
x = [0 0; 1 1]; y_correct = [1 0]' assert(isequal(vectorizeit(x),y_correct))

y_correct = 1 0 x = 0 1 even = 0 odd = 1 even = 0 odd = 1

Suggested Problems