Filter löschen
Filter löschen

Global variables in embedded Matlab function

1 Ansicht (letzte 30 Tage)
Mitch Martelli
Mitch Martelli am 20 Mär. 2013
Hi @ all,
I would like to use some variables defined in a m-file into embedded Matlab block in Simulink. I would like to do this without define again the variables names and values.
Someone knows if it possible to use some global variables defined in the Matlab workspace in the embedded Matlab block in Simulink?
There is an alternative method to do what I want?
Thanks in advance
Mitch

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 20 Mär. 2013
You can pass your constant through a constant block,
  3 Kommentare
Mitch Martelli
Mitch Martelli am 21 Mär. 2013
Thanks Azzi and Guy,
@ Azzi I already use constant block but when there are a lot of parameters is not confortable.
@ Guy Your help was very usefull. How can I accpet your answer?
Azzi Abdelmalek
Azzi Abdelmalek am 21 Mär. 2013
I've always used constant block as input argument for Matlab function block and it worked fine. But I 've also thought that there is a better way to do it, Guy 's answer is really what I was looking for. Thanks Guy

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Functions 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