필터 지우기
필터 지우기

Access Lookup Table Data from MATLAB command line

조회 수: 7 (최근 30일)
João Araújo
João Araújo 2019년 5월 7일
댓글: HINA FATHIMA 2023년 10월 4일
Hello,
I am trying to build a script to extract data from a model. In this case I need to extract data from Lookup tables.
Using find_system with 'BlockDialogParams' I can find all the referenced variables inside blocks, but I cannot know which ones they are. Namely in lookup tables, I would like to know which variable is X, Y, table, etc.
Is there a way to extract this information from the block via command?
Thanks in advance.

채택된 답변

João Araújo
João Araújo 2019년 5월 10일
for Lookup tables: get_param(Path, 'Table') and get_param(Path,'InputValues')
and for Lookup2D and others: get_param(Path, 'Table'), get_param(Path, 'RowIndex') and get_param(Path, 'ColumnIndex')
  댓글 수: 1
HINA FATHIMA
HINA FATHIMA 2023년 10월 4일
get_param(Path,'InputValues') gives this error. Lookup_n-D block does not have a parameter named 'InputValues'. Please guide

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2019년 5월 7일
For example, set_param(FullBlockPath, 'Table','rand(5,5)');
web(fullfile(docroot, 'simulink/slref/block-specific-parameters.html#mw_bcbf0db9-99c3-49db-b165-cbaa8e19fa2d'))
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2019년 5월 8일
get_param(FullBlockPath, 'Table')
João Araújo
João Araújo 2019년 5월 10일
Thanks, you got me on the right path!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

태그

제품


릴리스

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by