SIM command clears workspace
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to run a simulink simulation from an M-file. The problem is that running 'sim' clears the current workspace, and thus clears variables needed in the simulink simulation and also nested for loop variables.
I've tried
simset('SrcWorkspace','current', 'DstWorkspace', 'current');
As a 'SIM' options parameter as suggested in previous posts with similar titles, however, this does absolutely nothing.
How do I stop 'SIM' clearing my workspace? Running MATLAB R2011b.
10 Kommentare
Jan
am 1 Okt. 2017
What do you think about the suggestion to open a new thread? Then it is possible to post an answer in the section for answers and you can accept an answer, if it solves your problem.
Antworten (1)
Ryan G
am 2 Nov. 2012
This SIM command should not clear your workspace, you should not have to workaround that.
Check your model callbacks and see if there is any functions/scripts being called that clear the workspace.
0 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!