필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to Find Indices

조회 수: 1 (최근 30일)
Rightia Rollmann
Rightia Rollmann 2016년 8월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
How to find the first three indices corresponding to elements that are less than 10 and their indices start from 3? I try the function below but it doesn’t show the indices of elements correctly. The correct answer should be: B = [ 3 5 8 9 ]
A = [ 18 3 1 11 8 10 11 3 9 14 6 1 4 3 15 21 ];
B = find( A( 3 : end ) < 10, 4 )
B = [ 1 3 6 7 ]

답변 (1개)

Image Analyst
Image Analyst 2016년 8월 13일
Try adding 2 and changing 4 to 3:
A = [ 18 3 1 11 8 10 11 3 9 14 6 1 4 3 15 21 ];
B = find( A( 3 : end ) < 10, 3, 'first') + 2
B =
3 5 8

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by