How to get the index of a value in a table?
242 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
EM
am 22 Sep. 2019
Kommentiert: Mohamad Alkhalidi
am 24 Sep. 2020
Hi everyone,
I'm new into Matlab.
I have a table T with let's say 2000 raws in one column. Values in the table are not similar.
I want to get the index of an especific value. How can I do that?
Thank you
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 22 Sep. 2019
Bearbeitet: madhan ravi
am 22 Sep. 2019
index = find(TABLE{:,:}==specific_value)
%or
[~,index] = ismember(specific_value,TABLE{:,:})
If you're dealing with decimals you need to use ismembertol().
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!