Terminate a dead loop or a function automatically in Matlab

Version 1.0.0.0 (1,72 ko) par Zheng
Terminate a dead loop or a function automatically in Matlab
33 téléchargements
Mise à jour 8 août 2017

Afficher la licence

This example shows the process to terminate a dead loop or a function automatically.
The idea is to check the Process ID of the running matlab in windows. When the time for running some functions takes too long a time, then kill the job by DOS

command: taskkill -f /pid PID

The command to get the PID of the running job can be obtanied by DOS command: System.Diagnostics.Process.GetProcessesByName.

The main control subroutine is main_control.m; and dummy_dead_loop.m is to simulate the dead endless loop or a function.

Citation pour cette source

Zheng (2025). Terminate a dead loop or a function automatically in Matlab (https://fr.mathworks.com/matlabcentral/fileexchange/64045-terminate-a-dead-loop-or-a-function-automatically-in-matlab), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2010a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!

matlab_kill_jobs/

Version Publié le Notes de version
1.0.0.0