How to kill an execution in app designer

83 vues (au cours des 30 derniers jours)
saeed ahmed
saeed ahmed le 12 Sep 2020
Commenté : Mario Malic le 20 Sep 2020
hello i am working on matlab app design. i need a solution some kind of system command that can kill the all the exicution on matlab when i click on app design button component.
  7 commentaires
Walter Roberson
Walter Roberson le 20 Sep 2020
See my Answer. In particular, the third link contains a list of every possibility that I was able to think of for terminating a function without its cooperation.
Mario Malic
Mario Malic le 20 Sep 2020
Screenshot of an app is not a specific detail. Specific detail would be, to show us the commands executed that are relevant to what you want to do (not all the code). When you press Start Training button, show us part of the code where iteration takes one hour, or make an example if it's not possible to share it.
Walter's answer is more than helpful if you want to tackle the problem yourself.

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 13 Sep 2020
What you ask for is not always possible in a single MATLAB session. You might need a second MATLAB session to do the monitoring and send a signal or use system "taskkill" to kill the MATLAB session.
If you use a parfeval "future" then you can cancel the future to halt execution, but it is not publically defined the circumstances under which a future will shut down.
If you are executing inside the Symbolic Toolbox computation engine, then that is a separate process that MATLAB uses TCP/IP to talk to, and nothing you can do inside MATLAB can affect it (except to kill the process.)
If you are executing inside a DLL, including executing inside LAPACK or MKL automatically called on your behalf by MATLAB to perform high performance calculations, then those are not listening for interruptions and you cannot get control back until they return, except by killing your MATLAB process.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by