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 日

0 投票

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 日

1 投票

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 件のコメント

João Araújo
João Araújo 2019 年 5 月 8 日
I don't want to set the table parameters, I want to read them. In the example above, I would like to know what is set to row parameters, column and table.
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!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Nonlinearity についてさらに検索

製品

リリース

R2013a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by