필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
Amgad Abuwarda
Amgad Abuwarda 2018년 9월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
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
Amgad Abuwarda
Amgad Abuwarda 2018년 9월 13일
it does not work, Error using == Too many input arguments.
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