Cody

Solution 1652791

Submitted on 18 Oct 2018 by Binbin Qi
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

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

Suggested Problems

More from this Author4