Borrar filtros
Borrar filtros

Access Lookup Table Data from MATLAB command line

7 visualizaciones (últimos 30 días)
João Araújo
João Araújo el 7 de Mayo de 2019
Comentada: HINA FATHIMA el 4 de Oct. de 2023
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.

Respuesta aceptada

João Araújo
João Araújo el 10 de Mayo de 2019
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 comentario
HINA FATHIMA
HINA FATHIMA el 4 de Oct. de 2023
get_param(Path,'InputValues') gives this error. Lookup_n-D block does not have a parameter named 'InputValues'. Please guide

Iniciar sesión para comentar.

Más respuestas (1)

Fangjun Jiang
Fangjun Jiang el 7 de Mayo de 2019
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 comentarios
Fangjun Jiang
Fangjun Jiang el 8 de Mayo de 2019
get_param(FullBlockPath, 'Table')
João Araújo
João Araújo el 10 de Mayo de 2019
Thanks, you got me on the right path!

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by