필터 지우기
필터 지우기

How can I find the indices of a vector?

조회 수: 15 (최근 30일)
Francesco
Francesco 2014년 2월 25일
댓글: Francesco 2014년 2월 25일
If I have a row vector,what command allows me to find the indexes that exceed a certain value that I want as a threshold. For example:
A =
0.1222
0.1350
0.1759
0.1110
0.1015
0.2599
0.1465
I would like in output the indices of the value grater or equal than 0.123, for example.

채택된 답변

Mischa Kim
Mischa Kim 2014년 2월 25일
편집: Mischa Kim 2014년 2월 25일
Use
ind = find(A >= 0.123)
  댓글 수: 1
Francesco
Francesco 2014년 2월 25일
And If I want to extract some the numeric value of an 19x2 double array (for example) according to the number of the ind variable how can I do?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Thomas
Thomas 2014년 2월 25일
편집: Thomas 2014년 2월 25일
[r,c]=find(A>=0.123)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by