필터 지우기
필터 지우기

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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by