How do I find the indices of the value of my matrix?
Mostra commenti meno recenti
How can I find the indices and exactly position of the value of the attached file. For example find index of value = -69.19 from the attached file.
Thanks
Risposta accettata
Più risposte (5)
KALYAN ACHARJYA
il 16 Dic 2019
Modificato: KALYAN ACHARJYA
il 16 Dic 2019
Load the mat file, say as data variable
idx=find(data==-69.19)
Please read about floating number precision (Must)
Example:
>> A=[1 -69.19 3.5 10];
>> idx=find(A==-69.19)
idx =
2
1 Commento
Stephen23
il 16 Dic 2019
This is not robust and does not work for the provided value:
>> any(XX(:) == -69.19)
ans = 0
Farshid Daryabor
il 16 Dic 2019
0 voti
Farshid Daryabor
il 16 Dic 2019
0 voti
Farshid Daryabor
il 16 Dic 2019
0 voti
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!