finding location of logical 1 row wise by column

9 views (last 30 days)
Hi, I have a 8 x 621 logical and I would like to extract the row location of the logical 1 by columns i.e the result should be ans = [ 5 8 3 8 ....]
How may I do that?
Thank you!

Accepted Answer

Stephen23
Stephen23 on 15 Oct 2019
[idr,~] = find(yourMatrix)

More Answers (0)

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!