Cody

Solution 1983520

Submitted on 20 Oct 2019
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]; aMat = ones(9,9)*2; ref = (aVec*bVec)*aMat^2; user = MyFunc(); assert(isequal(user,ref))

Unrecognized function or variable 'aVec'. Error in MyFunc (line 2) xMat=(aVec*bVec)*aMat.^2 Error in Test1 (line 5) user = MyFunc();

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

Unrecognized function or variable 'aVec'. Error in MyFunc (line 2) xMat=(aVec*bVec)*aMat.^2 Error in Test2 (line 2) [xMat aVec] = MyFunc();

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

Unrecognized function or variable 'aVec'. Error in MyFunc (line 2) xMat=(aVec*bVec)*aMat.^2 Error in Test3 (line 2) [xMat aVec bVec] = MyFunc();

4   Fail
aRef = ones(9,9)*2; [xMat aVec bVec aMat] = MyFunc(); assert(isequal(aRef,aMat))

Unrecognized function or variable 'aVec'. Error in MyFunc (line 2) xMat=(aVec*bVec)*aMat.^2 Error in Test4 (line 2) [xMat aVec bVec aMat] = MyFunc();

Suggested Problems

More from this Author26