Terminate a dead loop or a function automatically in Matlab

版本 1.0.0.0 (1.7 KB) 作者: Zheng
Terminate a dead loop or a function automatically in Matlab
33.0 次下载
更新时间 2017/8/8

查看许可证

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.

引用格式

Zheng (2024). Terminate a dead loop or a function automatically in Matlab (https://www.mathworks.com/matlabcentral/fileexchange/64045-terminate-a-dead-loop-or-a-function-automatically-in-matlab), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Startup and Shutdown 的更多信息
标签 添加标签

Community Treasure Hunt

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

Start Hunting!

matlab_kill_jobs/

版本 已发布 发行说明
1.0.0.0