stop running script after close figure

10 visualizzazioni (ultimi 30 giorni)
Eden Eden
Eden Eden il 21 Giu 2016
Commentato: Eden Eden il 21 Giu 2016
Hi, How can I stop running script after I'm closing figure? (When I'm closing a figure it is reopened (using loop)). *Not mean to 'ctrl+C'. Thanks!

Risposta accettata

Stephen23
Stephen23 il 21 Giu 2016
Hint: get the figure handle, and check it with ishghandle. This is easy to do in a loop.

Più risposte (1)

KSSV
KSSV il 21 Giu 2016
You can type 'break' where you want to stop the code in the file. The code executes till the line before break and then exits.
  1 Commento
Eden Eden
Eden Eden il 21 Giu 2016
Modificato: Eden Eden il 21 Giu 2016
thanks, I meant only when I'm closing the figure window the script will stop. There is any way of doing it?

Accedi per commentare.

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by