wait until batch Cygwin simulataion finish?
1 次查看(过去 30 天)
显示 更早的评论
I am running batch file from matlab in a loop form. How can I make the matlab loop wait until the batch execution finished?
for k=1:1:3
dos('mrun.bat');
end
0 个评论
采纳的回答
Walter Roberson
2015-5-14
If the .bat file does not start any interactive processes and does not use "&" to create a new process, then dos() will automatically wait for it to finish.
If the .bat file starts an interactive process (for example it might start up Excell) then you can loop testing to see if the processes are still alive; see this File Exchange Contribution or you can use tasklist
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!