Write a function named 'zero_finder' that takes a matrix as input and returns the row index of the last zero for each for each column. If the 2nd input to the function is 2, it performs the same operation row-wise. If the 2nd input is 'all', it returns the index of last zero in the matrix.If no zero is present,it returns nan.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers30
Suggested Problems
-
195 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1283 Solvers
-
389 Solvers
-
Matrix of almost all zeros, except for main diagonal
191 Solvers
-
75 Solvers
More from this Author30
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!