Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Disrupting a "distant" while loop

1 visualización (últimos 30 días)
Michaël
Michaël el 15 de Mzo. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello,
if obj.State
obj.function
else
%disrupt the execution of obj.function
end
If obj.State isn't equal to 1, I'd like to disrupt the execution of the obj.function function, which includes a while 1 (infinite) loop.
What do you think?
Thank you very much
  1 comentario
dpb
dpb el 15 de Mzo. de 2016
Editada: dpb el 15 de Mzo. de 2016
I think it's hopeless without a way to communicate to the function other than terminating the script entirely. Also, there's no way to get from the if clause to the else one while the function is running unless you've spawned a separate process as the code is serial at that point.

Respuestas (0)

La pregunta está cerrada.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by