Find the index value
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a an array.I need to find its index value.How can i do that?
댓글 수: 1
채택된 답변
KALYAN ACHARJYA
2019년 10월 6일
편집: KALYAN ACHARJYA
2019년 10월 6일
>> array_data=2:3:30
array_data =
2 5 8 11 14 17 20 23 26 29
Case 1: I assumed you are looking for index value of specific element in the array, say 17
idx=find(array_data==17)
Case 2: for all array Elements
idx=1:length(array_data)
Hope it helps!
댓글 수: 10
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!