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

Solution 315335

Submitted on 5 Sep 2013 by Binbin Qi

Correct

34Size
Leading solution size is 23.
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
 
%%
aVec = [3.14 15 9 26];
bVec = [2.71;8;28;182];
ref = bVec*aVec;
user = MyFunc();
assert(isequal(user,ref))

                    
2
Pass
 
%%
aRef = [3.14 15 9 26];
[xMat aVec] = MyFunc();
assert(isequal(aRef,aVec))

                    
3
Pass
 
%%
bRef = [2.71;8;28;182];
[xMat aVec bVec] = MyFunc();
assert(isequal(bRef,bVec))