Variablen in Simulink definieren (ohne Matlab)

7 vues (au cours des 30 derniers jours)
Christian Maier
Christian Maier le 10 Sep 2017
Sehr geehrte Damen und Herren,
mit liegt eine Simulink Datei (slx) vor. Wenn ich diese in Simulink ausführe schreibt es mir automatisch Variablen in den Workspace ein, auch wenn hier vorher keine definiert waren. Kann mir jemand sagen wie und warum?
Besten Dank und viele Grüße Christian Maier

Réponses (2)

Sebastian Castro
Sebastian Castro le 11 Sep 2017
My answer is in English, I hope it is OK...
Have you looked into the model callbacks of that model? This is typically where MATLAB variables can be created directly from a Simulink model. https://www.mathworks.com/help/simulink/ug/model-callbacks.html
- Sebastian

Christian Maier
Christian Maier le 12 Sep 2017
Hello,
thanks a lot for your response. This is it. In the callback section there is a position called InitFcn where I can define the variables. Thanks a lot. My problem is solved.
Have a nice day Christian

Catégories

En savoir plus sur Model, Block, and Port Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by