I'm not sure this would work if there is a 0 in x...
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = rand(4);
y_correct = [0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0]
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
|
2 | Pass |
x = [1 5 7 6; 3 6 8 9; 5 6 7 8]
y_correct = [0 0 0 0;0 0 0 0;0 0 0 0]
assert(isequal(your_fcn_name(x),y_correct))
x =
1 5 7 6
3 6 8 9
5 6 7 8
y_correct =
0 0 0 0
0 0 0 0
0 0 0 0
|
3074 Solvers
3375 Solvers
Back to basics 21 - Matrix replicating
1052 Solvers
219 Solvers
516 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!