Cody

Solution 1753116

Submitted on 17 Mar 2019 by Maryam Majidi
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
aMat = ones(9,9)*2; bMat = diag([1:5 4:-1:1]); cMat = reshape(1:100,10,10); zRef = det(cMat)*(aMat*bMat)' zMat = MyFunc(); assert(isequal(zRef,zMat))

zRef = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 aMat = 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 bMat = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bMat = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bMat = 1 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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1 1 1 4 14 24 34 1 1 1 1 1 1 5 15 25 35 1 1 1 1 1 1 6 16 26 36 1 1 1 1 1 1 7 17 27 37 1 1 1 1 1 1 8 18 28 38 1 1 1 1 1 1 9 19 29 39 1 1 1 1 1 1 10 20 30 40 1 1 1 1 1 1 cMat = 1 11 21 31 41 1 1 1 1 1 2 12 22 32 42 1 1 1 1 1 3 13 23 33 43 1 1 1 1 1 4 14 24 34 44 1 1 1 1 1 5 15 25 35 45 1 1 1 1 1 6 16 26 36 46 1 1 1 1 1 7 17 27 37 47 1 1 1 1 1 8 18 28 38 48 1 1 1 1 1 9 19 29 39 49 1 1 1 1 1 10 20 30 40 50 1 1 1 1 1 cMat = 1 11 21 31 41 51 1 1 1 1 2 12 22 32 42 52 1 1 1 1 3 13 23 33 43 53 1 1 1 1 4 14 24 34 4...

2   Pass
Ref = ones(9,9)*2; [zMat Mat] = MyFunc(); assert(isequal(Ref,Mat))

aMat = 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 bMat = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bMat = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bMat = 1 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0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1 1 8 18 28 1 1 1 1 1 1 1 9 19 29 1 1 1 1 1 1 1 10 20 30 1 1 1 1 1 1 1 cMat = 1 11 21 31 1 1 1 1 1 1 2 12 22 32 1 1 1 1 1 1 3 13 23 33 1 1 1 1 1 1 4 14 24 34 1 1 1 1 1 1 5 15 25 35 1 1 1 1 1 1 6 16 26 36 1 1 1 1 1 1 7 17 27 37 1 1 1 1 1 1 8 18 28 38 1 1 1 1 1 1 9 19 29 39 1 1 1 1 1 1 10 20 30 40 1 1 1 1 1 1 cMat = 1 11 21 31 41 1 1 1 1 1 2 12 22 32 42 1 1 1 1 1 3 13 23 33 43 1 1 1 1 1 4 14 24 34 44 1 1 1 1 1 5 15 25 35 45 1 1 1 1 1 6 16 26 36 46 1 1 1 1 1 7 17 27 37 47 1 1 1 1 1 8 18 28 38 48 1 1 1 1 1 9 19 29 39 49 1 1 1 1 1 10 20 30 40 50 1 1 1 1 1 cMat = 1 11 21 31 41 51 1 1 1 1 2 12 22 32 42 52 1 1 1 1 3 13 23 33 43 53 1 1 1 1 4 14 24 34 44 54 1 1 1 1 5 15 25 35 45 55 1 1 1 1 6 16 26 36 46 56 1 1 1 1 7 17 27 37 47 57 1 1 1 1 8 18 28 38 48 58 1 1 1 1 9 19 29 39 49 59 1 1 1 1 10 20 30 40 50 60 1 1 1 1 cMat = 1 11 21 31 41 51 61 1 1 1 2 12 22 32 42 52...

3   Pass
Ref = diag([1:5 4:-1:1]); [zMat a Mat] = MyFunc(); assert(isequal(Ref,Mat))

aMat = 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 bMat = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 1 1 1 1 1 1 1 4 14 1 1 1 1 1 1 1 1 5 15 1 1 1 1 1 1 1 1 6 16 1 1 1 1 1 1 1 1 7 17 1 1 1 1 1 1 1 1 8 18 1 1 1 1 1 1 1 1 9 19 1 1 1 1 1 1 1 1 10 20 1 1 1 1 1 1 1 1 cMat = 1 11 21 1 1 1 1 1 1 1 2 12 22 1 1 1 1 1 1 1 3 13 23 1 1 1 1 1 1 1 4 14 24 1 1 1 1 1 1 1 5 15 25 1 1 1 1 1 1 1 6 16 26 1 1 1 1 1 1 1 7 17 27 1 1 1 1 1 1 1 8 18 28 1 1 1 1 1 1 1 9 19 29 1 1 1 1 1 1 1 10 20 30 1 1 1 1 1 1 1 cMat = 1 11 21 31 1 1 1 1 1 1 2 12 22 32 1 1 1 1 1 1 3 13 23 33 1 1 1 1 1 1 4 14 24 34 1 1 1 1 1 1 5 15 25 35 1 1 1 1 1 1 6 16 26 36 1 1 1 1 1 1 7 17 27 37 1 1 1 1 1 1 8 18 28 38 1 1 1 1 1 1 9 19 29 39 1 1 1 1 1 1 10 20 30 40 1 1 1 1 1 1 cMat = 1 11 21 31 41 1 1 1 1 1 2 12 22 32 42 1 1 1 1 1 3 13 23 33 43 1 1 1 1 1 4 14 24 34 44 1 1 1 1 1 5 15 25 35 45 1 1 1 1 1 6 16 26 36 46 1 1 1 1 1 7 17 27 37 47 1 1 1 1 1 8 18 28 38 48 1 1 1 1 1 9 19 29 39 49 1 1 1 1 1 10 20 30 40 50 1 1 1 1 1 cMat = 1 11 21 31 41 51 1 1 1 1 2 12 22 32 42 52 1 1 1 1 3 13 23 33 43 53 1 1 1 1 4 14 24 34 44 54 1 1 1 1 5 15 25 35 45 55 1 1 1 1 6 16 26 36 46 56 1 1 1 1 7 17 27 37 47 57 1 1 1 1 8 18 28 38 48 58 1 1 1 1 9 19 29 39 49 59 1 1 1 1 10 20 30 40 50 60 1 1 1 1 cMat = 1 11 21 31 41 51 61 1 1 1 2 12 22 32 42 52...

4   Pass
Ref = re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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 cMat = 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 8 1 1 1 1 1 1 1 1 1 9 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 cMat = 1 11 1 1 1 1 1 1 1 1 2 12 1 1 1 1 1 1 1 1 3 13 1 1 1 1 1 1 1 1 4 14 1 1 1 1 1 1 1 1 5 15 1 1 1 1 1 1 1 1 6 16 1 1 1 1 1 1 1 1 7 17 1 1 1 1 1 1 1 1 8 18 1 1 1 1 1 1 1 1 9 19 1 1 1 1 1 1 1 1 10 20 1 1 1 1 1 1 1 1 cMat = 1 11 21 1 1 1 1 1 1 1 2 12 22 1 1 1 1 1 1 1 3 13 23 1 1 1 1 1 1 1 4 14 24 1 1 1 1 1 1 1 5 15 25 1 1 1 1 1 1 1 6 16 26 1 1 1 1 1 1 1 7 17 27 1 1 1 1 1 1 1 8 18 28 1 1 1 1 1 1 1 9 19 29 1 1 1 1 1 1 1 10 20 30 1 1 1 1 1 1 1 cMat = 1 11 21 31 1 1 1 1 1 1 2 12 22 32 1 1 1 1 1 1 3 13 23 33 1 1 1 1 1 1 4 14 24 34 1 1 1 1 1 1 5 15 25 35 1 1 1 1 1 1 6 16 26 36 1 1 1 1 1 1 7 17 27 37 1 1 1 1 1 1 8 18 28 38 1 1 1 1 1 1 9 19 29 39 1 1 1 1 1 1 10 20 30 40 1 1 1 1 1 1 cMat = 1 11 21 31 41 1 1 1 1 1 2 12 22 32 42 1 1 1 1 1 3 13 23 33 43 1 1 1 1 1 4 14 24 34 44 1 1 1 1 1 5 15 25 35 45 1 1 1 1 1 6 16 26 36 46 1 1 1 1 1 7 17 27 37 47 1 1 1 1 1 8 18 28 38 48 1 1 1 1 1 9 19 29 39 49 1 1 1 1 1 10 20 30 40 50 1 1 1 1 1 cMat = 1 11 21 31 41 51 1 1 1 1 2 12 22 32 42 52 1 1 1 1 3 13 23 33 43 53 1 1 1 1 4 14 24 34 44 54 1 1 1 1 5 15 25 35 45 55 1 1 1 1 6 16 26 36 46 56 1 1 1 1 7 17 27 37 47 57 1 1 1 1 8 18 28 38 48 58 1 1 1 1 9 19 29 39 49 59 1 1 1 1 10 20 30 40 50 60 1 1 1 1 cMat = 1 11 21 31 41 51 61 1 1 1 2 12 22 32 42 52...

Suggested Problems

More from this Author26