using a variable in simulink function

1 visualizzazione (ultimi 30 giorni)
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 Commenti
Azzi Abdelmalek
Azzi Abdelmalek il 22 Dic 2013
This is not clear
Rashmil Dahanayake
Rashmil Dahanayake il 23 Dic 2013
Hi, Please find attached the simulink file. I have commented inside the file.

Accedi per commentare.

Risposta accettata

Kaustubha Govind
Kaustubha Govind il 30 Dic 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 Commento
Rashmil Dahanayake
Rashmil Dahanayake il 31 Dic 2013
It worked after changing the data type from input to parameter Thanks

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su RF Blockset Models for Transceivers in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by