Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [0 1 0 0;4 3 7 0;0 0 2 6;0 9 0 5];
y_correct = [2 1 2 3];
assert(isequal(firstNonZeros(x),y_correct))
a =
4×4 logical array
1 0 1 1
0 0 0 1
1 1 0 0
1 0 1 0
v =
1×4 logical array
0 0 0 0
i =
2 1 2 3
|
Extract leading non-zero digit
967 Solvers
3307 Solvers
746 Solvers
Return elements unique to either input
475 Solvers
Create an n-by-n null matrix and fill with ones certain positions
140 Solvers