Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how to identify a row given a value in the stuct file

1 visualización (últimos 30 días)
Amgad Abuwarda
Amgad Abuwarda el 13 de Sept. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hey guys, please have a look at the attached screenshot of a stuct file. Now i need for example to identify the row which has link_id 52852003, and get back the corresponding ST_NM_BASE of this row. how to write this in matlab? would be better if i can write a part of the link_id, not the whole value ( 52852 instead of 52852003 )
any help?

Respuestas (1)

Bob Thompson
Bob Thompson el 13 de Sept. de 2018
Typically, when looking to identify the row of a value you want to use the find() command.
[row, col, val] = find(data_map.link_id==52852003);
This probably won't work perfectly, but it should be a place to start.
  2 comentarios
Amgad Abuwarda
Amgad Abuwarda el 13 de Sept. de 2018
it does not work, Error using == Too many input arguments.
Bob Thompson
Bob Thompson el 13 de Sept. de 2018
Try [data_map.link_id], rather than the unbracketed version I sent before.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by