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 日

0 投票

[idr,~] = find(yourMatrix)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で MATLAB についてさらに検索

質問済み:

2019 年 10 月 15 日

回答済み:

2019 年 10 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by