Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
vector1=[1 3 5];
answer1 = [1 2 4];
assert(isequal(mysteryFunction3(vector1),answer1))
ans =
     1     2     4
2
Pass
 
%%
vector2 = [3 5 7 9];
answer2 = [ 3 4 6 8];
assert(isequal(mysteryFunction3(vector2),answer2))
ans =
     3     4     6     8
3
Pass
 
%%
vector4 = [9];
answer4 = [9]
assert(isequal(mysteryFunction3(vector4),answer4))
answer4 =
     9
ans =
     9