Is there a clever way to isolate Simulink Parameter callback workspace?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
The run command runs a script in the caller workspace. That got me thinking that there might be a clever way to run code in Simulink Parameter callback in an isolated workspace. I don't like the fact that the Parameter callbacks pollutes the base workspace. Variable collision(s) is unlikely but it is messy when callbacks are complicated.
Suggestions?
EDIT: One file is preferred. Right now I am restricted to use a single Simulink file otherwise I would just use a MATLAB function for the functionality I am looking for.
0 Kommentare
Antworten (1)
Sujit Muduli
am 6 Mär. 2018
Hi Jason, You may want to use Model Workspace or a Data dictionary if you don't want to pollute your base workspace. However, there is one alternative approach. You may create a MATLAB Function to perform all the calculations and since each MATLAB function has its own workspace it won't pollute your base workspace. You may also find the links below useful to do operations in different workspaces.
2 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!