This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x = [4,3,6; 2,5,3; 8,2,6]
y_correct = 0;
assert(isequal(is_it_zero(x),y_correct))
x =
4 3 6
2 5 3
8 2 6
x =
4 3 6
2 5 3
8 2 6
ans =
-84
y =
logical
1
|
2 | Pass |
x = [1,2,3; 4,5,6; 7,8,9]
y_correct = 1;
assert(isequal(is_it_zero(x),y_correct))
x =
1 2 3
4 5 6
7 8 9
x =
1 2 3
4 5 6
7 8 9
ans =
-9.5162e-16
y =
logical
1
|
3 | Pass |
x = [9,2,0; 4,4,0; 7,8,0]
y_correct = 1;
assert(isequal(is_it_zero(x),y_correct))
x =
9 2 0
4 4 0
7 8 0
x =
9 2 0
4 4 0
7 8 0
ans =
0
y =
logical
1
|
Sum all integers from 1 to 2^n
8414 Solvers
2539 Solvers
141 Solvers
204 Solvers
289 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!