using a variable in simulink function

1 vue (au cours des 30 derniers jours)
Rashmil Dahanayake
Rashmil Dahanayake le 22 Déc 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 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 22 Déc 2013
This is not clear
Rashmil Dahanayake
Rashmil Dahanayake le 23 Déc 2013
Hi, Please find attached the simulink file. I have commented inside the file.

Connectez-vous pour commenter.

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 30 Déc 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 commentaire
Rashmil Dahanayake
Rashmil Dahanayake le 31 Déc 2013
It worked after changing the data type from input to parameter Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur RF Blockset Models for Transceivers dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by