finding location of logical 1 row wise by column

7 次查看(过去 30 天)
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!

采纳的回答

Stephen23
Stephen23 2019-10-15
[idr,~] = find(yourMatrix)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by