Cody

Solution 2093521

Submitted on 15 Jan 2020
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   Fail
aVec = [3.14 15 9 26]; bVec = [2.71;8;28;182]; ref = sqrt((aVec').^2+bVec.^2) user = MyFunc(); assert(isequal(user,ref))

ref = 4.1477 17.0000 29.4109 183.8478

Not enough input arguments. Error in MyFunc (line 2) yVec=((a.*a)'+b.*b).^0.5; Error in Test1 (line 4) user = MyFunc();

2   Fail
aRef = [3.14 15 9 26]; [yVec aVec] = MyFunc(); assert(isequal(aRef,aVec))

Error using MyFunc Too many output arguments. Error in Test2 (line 2) [yVec aVec] = MyFunc();

3   Fail
bRef = [2.71;8;28;182]; [yVec aVec bVec] = MyFunc(); assert(isequal(bRef,bVec))

Error using MyFunc Too many output arguments. Error in Test3 (line 2) [yVec aVec bVec] = MyFunc();

Suggested Problems

More from this Author26