Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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?

回答(1 个)

Bob Thompson
Bob Thompson 2018-9-13
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 个评论
Bob Thompson
Bob Thompson 2018-9-13
Try [data_map.link_id], rather than the unbracketed version I sent before.

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by