필터 지우기
필터 지우기

Finding the first 1 in indicator variable

조회 수: 2 (최근 30일)
Mads
Mads 2011년 5월 25일
Hi all.
If i have an indicator variable which a bunch of 1's. How do i most efficiently find the position of the first 1?
Thx

채택된 답변

Andrei Bobrov
Andrei Bobrov 2011년 5월 25일
out = find(A,1,'first')
A - your indicator variable (vector)
[outI,outJ] = find(A,1,'first')
here A - your indicator variable (matrix)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by