Cody

Solution 1636974

Submitted on 2 Oct 2018 by Suraj Gurav
  • Size: 11
  • This is the leading solution.
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
x=[1 2 3]; y=[4 5 6]; z_correct = [5 6 7;6 7 8;7 8 9] assert(isequal(addmat(x,y),z_correct))

z_correct = 5 6 7 6 7 8 7 8 9 ans = []

2   Pass
x=[10 20 30 40]; y=[-10 -20 -30 -40]; z_correct = [0 10 20 30;-10 0 10 20;-20 -10 0 10;-30 -20 -10 0] assert(isequal(addmat(x,y),z_correct))

z_correct = 0 10 20 30 -10 0 10 20 -20 -10 0 10 -30 -20 -10 0 ans = []

Suggested Problems

More from this Author4