Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 3;
y_correct =[1 4 9
4 4 9
9 9 9]
assert(isequal(mat(n),y_correct))
y_correct =
1 4 9
4 4 9
9 9 9
|
2 | Pass |
n = 4;
y_correct = [1 4 9 16
4 4 9 16
9 9 9 16
16 16 16 16]
assert(isequal(mat(n),y_correct))
y_correct =
1 4 9 16
4 4 9 16
9 9 9 16
16 16 16 16
|
3 | Pass |
n= 7;
y_correct =[1 4 9 16 25 36 49
4 4 9 16 25 36 49
9 9 9 16 25 36 49
16 16 16 16 25 36 49
25 25 25 25 25 36 49
36 36 36 36 36 36 49
49 49 49 49 49 49 49]
assert(isequal(mat(n),y_correct))
y_correct =
1 4 9 16 25 36 49
4 4 9 16 25 36 49
9 9 9 16 25 36 49
16 16 16 16 25 36 49
25 25 25 25 25 36 49
36 36 36 36 36 36 49
49 49 49 49 49 49 49
|
Return the largest number that is adjacent to a zero
3749 Solvers
Replace NaNs with the number that appears to its left in the row.
2018 Solvers
594 Solvers
Return elements unique to either input
550 Solvers
856 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!