using a variable in simulink function

1 Ansicht (letzte 30 Tage)
Rashmil Dahanayake
Rashmil Dahanayake am 22 Dez. 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 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 22 Dez. 2013
This is not clear
Rashmil Dahanayake
Rashmil Dahanayake am 23 Dez. 2013
Hi, Please find attached the simulink file. I have commented inside the file.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Kaustubha Govind
Kaustubha Govind am 30 Dez. 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 Kommentar
Rashmil Dahanayake
Rashmil Dahanayake am 31 Dez. 2013
It worked after changing the data type from input to parameter Thanks

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu RF Blockset Models for Transceivers finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by