Changing model programmatically: discard changes and exit?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Danijel Domazet
am 18 Mai 2020
Beantwortet: Fangjun Jiang
am 18 Mai 2020
Hi,
I programmatically change a model in Simulink, run the simulation, and exit.
open_system(...)
add_block(...)
sim(...)
When I run it again, I get an error from add_block() that the block already exists.
So I add
save_system('different_name')
and than I can run the model again with no problem.
However, I would like to exit without saving the modified model.
Is it possible to somehow discard the changes and exit?
1 Kommentar
Stijn Haenen
am 18 Mai 2020
You can stop/quit via the cmd prompt:
!TASKKILL /F /IM MATLABWindow.exe /T &
Akzeptierte Antwort
Weitere Antworten (0)
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!