How can I find the indices of a vector?

15 Ansichten (letzte 30 Tage)
Francesco
Francesco am 25 Feb. 2014
Kommentiert: Francesco am 25 Feb. 2014
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.

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 25 Feb. 2014
Bearbeitet: Mischa Kim am 25 Feb. 2014
Use
ind = find(A >= 0.123)
  1 Kommentar
Francesco
Francesco am 25 Feb. 2014
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?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Thomas
Thomas am 25 Feb. 2014
Bearbeitet: Thomas am 25 Feb. 2014
[r,c]=find(A>=0.123)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by