フィルターのクリア

find the index of the rows that have all 1

17 ビュー (過去 30 日間)
pamela sulis
pamela sulis 2016 年 4 月 7 日
編集済み: Azzi Abdelmalek 2016 年 4 月 7 日
Hi, I have a matrix
A= [ 0 0 0 0 0
0 1 1 1 1
1 1 1 0 0
0 0 0 0 1
0 0 0 1 0
1 1 1 1 1
0 1 1 1 1
0 1 1 1 0
0 0 1 1 1
1 1 1 1 1
0 0 0 1 0]
I want to find the index of the rows that have all 1, can you help me?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 7 日
編集済み: Azzi Abdelmalek 2016 年 4 月 7 日
idx=find(all(A,2))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by