Borrar filtros
Borrar filtros

How to "Create new data" for a custom library block

2 visualizaciones (últimos 30 días)
Chuyen
Chuyen el 4 de Dic. de 2023
Comentada: Chuyen el 14 de Dic. de 2023
Hello all,
I am creating a custom library block for my project which I followed mask concept as Unit delay block. However, I got some difficulties on creating New data for my state variable. Currently, I can only create a state variable which will be stored in data dictionary by default; however, I would like to create as following Unitdelay concept. But I could not find any documents which introduced how to do these stuffs for custom library block.
Or whether are there any Parameter options available for creating this on Mask Editor? Please give me some hints here. Thank you so much!
  4 comentarios
madhan ravi
madhan ravi el 4 de Dic. de 2023
sorry I haven't worked with data dictionary yet, so can"t help you
Chuyen
Chuyen el 5 de Dic. de 2023
Editada: Chuyen el 5 de Dic. de 2023
Anyway, thank you for addressing here. I am still finding some sources which introduce that but there is nothing so far. Not sure Mathworks supports to manupilate it programatically.

Iniciar sesión para comentar.

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 5 de Dic. de 2023
Editada: Fangjun Jiang el 5 de Dic. de 2023
Create a Mask for your customized library block, then when you double click the block, you will have a dialog to specify that parameter, just like the dialog you got when double click the UnitDelay block. The built-in "three dot action button" always appears on the side. Click the button and you will see the "Create variable" or "ParameterName: Create ..." option.
  13 comentarios
Fangjun Jiang
Fangjun Jiang el 13 de Dic. de 2023
For new variables, the model workspace option should always be there.
There is API for model workspace too.
Chuyen
Chuyen el 14 de Dic. de 2023
Thank you so much. I will take a look

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by