Cody

# Problem 1699. Find last zero for each column

Solution 1923932

Submitted on 6 Sep 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
a = 0; z_correct = 1; assert(isequal(lastzerorow(a),z_correct))

M = 0 I = 1

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test1 (line 3) assert(isequal(lastzerorow(a),z_correct))

2   Fail
a = 1; z_correct = 0; assert(isequal(lastzerorow(a),z_correct))

M = 1 I = 1

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test2 (line 3) assert(isequal(lastzerorow(a),z_correct))

3   Fail
a = randi(1000,1000,1); z_correct = 0; assert(isequal(lastzerorow(a),z_correct))

M = 1 I = 987

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test3 (line 3) assert(isequal(lastzerorow(a),z_correct))

4   Fail
a = [0;1;0;2;0;3;0;4;0;5;0;6;0;7;0;8;0;9;0;10]; z_correct = 19; assert(isequal(lastzerorow(a),z_correct))

M = 0 I = 1

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test4 (line 3) assert(isequal(lastzerorow(a),z_correct))

5   Fail
n = randi(1000); a = tril(ones(n)); z_correct = 0:n-1; assert(isequal(lastzerorow(a),z_correct))

M = 1 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = ...

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test5 (line 4) assert(isequal(lastzerorow(a),z_correct))

6   Fail
n = randi(1000); a = tril(ones(n),-1); z_correct = 1:n; assert(isequal(lastzerorow(a),z_correct))

M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = ...

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test6 (line 4) assert(isequal(lastzerorow(a),z_correct))

7   Fail
n = randi(1000); d = randi(n-1); a = tril(ones(n),-d); z_correct = min((0:n-1)+d,n); assert(isequal(lastzerorow(a),z_correct))

M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = ...

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test7 (line 5) assert(isequal(lastzerorow(a),z_correct))

8   Fail
a = magic(10)-1; z_correct = [0 0 1 0 0 0 0 0 0 0]; assert(isequal(lastzerorow(a),z_correct))

M = 3 I = 3 M = 4 I = 7 M = 0 I = 1 M = 1 I = 5 M = 2 I = 4 M = 28 I = 8 M = 29 I = 7 M = 25 I = 6 M = 26 I = 10 M = 27 I = 4

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test8 (line 3) assert(isequal(lastzerorow(a),z_correct))

9   Fail
a = [0 0 9 0; 0 0 1 8; 0 0 4 0; 0 0 2 3; 0 6 7 5]; z_correct = [5 4 0 3]; assert(isequal(lastzerorow(a),z_correct))

M = 0 I = 1 M = 0 I = 1 M = 1 I = 2 M = 0 I = 1

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test9 (line 7) assert(isequal(lastzerorow(a),z_correct))

10   Fail
a = [0 0 0 0 -4 0 0 0 0; 0 0 0 -3 -3 -3 0 0 0; 0 0 -2 3 -2 2 2 0 0; 0 -1 2 -1 1 -1 -1 1 0]; z_correct = [4 3 2 1 0 1 2 3 4]; assert(isequal(lastzerorow(a),z_correct))

M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 1 I = 4 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1 M = 0 I = 1

Output argument "z" (and maybe others) not assigned during call to "lastzerorow". Error in Test10 (line 6) assert(isequal(lastzerorow(a),z_correct))