It looks like I forgot to put in size(x,2) instead of 4. Apparently the test suite didn't check that.
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))
|
144 Solvers
905 Solvers
Fahrenheit to Celsius converter
262 Solvers
341 Solvers
261 Solvers