using a variable in simulink function

1 visualización (últimos 30 días)
Rashmil Dahanayake
Rashmil Dahanayake el 22 de Dic. de 2013
Comentada: Rashmil Dahanayake el 31 de Dic. de 2013
I have a user defined function in simulink.
I need to use a global variable from simulink work space. How can access the simulink local worksspace, for the usage of simulink user defined function
  2 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 22 de Dic. de 2013
This is not clear
Rashmil Dahanayake
Rashmil Dahanayake el 23 de Dic. de 2013
Hi, Please find attached the simulink file. I have commented inside the file.

Iniciar sesión para comentar.

Respuesta aceptada

Kaustubha Govind
Kaustubha Govind el 30 de Dic. de 2013
I'm assuming that by "User Defined Function", you actually mean the MATLAB Function block? If so, you can read a workspace variable, by passing it in as a block parameter.
  1 comentario
Rashmil Dahanayake
Rashmil Dahanayake el 31 de Dic. de 2013
It worked after changing the data type from input to parameter Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre RF Blockset Models for Transceivers en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by