How to get the index of a value in a table?
239 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
EM
el 22 de Sept. de 2019
Comentada: Mohamad Alkhalidi
el 24 de Sept. de 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 comentarios
Respuesta aceptada
madhan ravi
el 22 de Sept. de 2019
Editada: madhan ravi
el 22 de Sept. de 2019
index = find(TABLE{:,:}==specific_value)
%or
[~,index] = ismember(specific_value,TABLE{:,:})
If you're dealing with decimals you need to use ismembertol().
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!