How to find first row with a nonzero element in an image matrix?

4 views (last 30 days)
I am trying to find the first row in an image matrix with a non zero value in it.
PLS&THANK YOU!

Accepted Answer

Walter Roberson
Walter Roberson on 16 Aug 2019
Edited: Walter Roberson on 16 Aug 2019
find(any(any(YourImage, 3),2),1,'first')

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!