Turn off compile mode

49 次查看(过去 30 天)
Simon Yngve
Simon Yngve 2012-2-21
评论: rsating 2024-6-27,23:23
Hi,
I use Model([], [], [], 'compile') to set the model in compile mode before computing some checksums. After receiving the checksums I want to close the model but I get an error that the model can't be closed since it is being compiled.
How do I turn off the compile mode?

采纳的回答

Kaustubha Govind
Kaustubha Govind 2012-2-21
Run the following command to terminate simulation:
>> model([], [], [], 'term')
  1 个评论
Joe
Joe 2017-10-4
One additional suggestion... if you ever find yourself in a situation where
model([], [], [], 'term')
does not work because Simulink "defers" the termination and you're stuck... Try the following,
set_param(gcs, 'SimulationCommand', 'stop')

请先登录,再进行评论。

更多回答(1 个)

Lukas
Lukas 2018-9-21
If the above commands doesn't help and you still see:
model([],[],[],'term')
Warning: Termination of 'model' deferred
then just try to execute model([],[],[],'term') multiple times.
I think this helps in case model had been compiled multiple times without terminating it. For example during debugging of a function that does this.
  2 个评论
Manu Madhu
Manu Madhu 2020-6-18
Thank you, it works
rsating
rsating 2024-6-27,23:23
Repeated "term" commands worked for me too. Thanks!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Classical Control Design 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by