How to get the index of a value in a table?
242 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
madhan ravi
il 22 Set 2019
Modificato: madhan ravi
il 22 Set 2019
index = find(TABLE{:,:}==specific_value)
%or
[~,index] = ismember(specific_value,TABLE{:,:})
If you're dealing with decimals you need to use ismembertol().
3 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!