how to determine if another instance of matlab is running ?
9 ビュー (過去 30 日間)
古いコメントを表示
hi, anyone who can tell me how to determine if another instance of matlab is running? (using a 'trick' right now: automatically write a dummy file when starting up matlab and deleting it when closing. checking for this file tells me if matlab is running or not. but there has to be a more elegant way (that also works if matlab closes not the way it should) I reckon?) thanks!
2 件のコメント
Daniel Shub
2011 年 7 月 19 日
A little more information about your OS, MATLAB version, and licensing, would be helpful.
採用された回答
Friedrich
2011 年 7 月 19 日
Hi,
on windows you can do:
[out, res] = dos('tasklist')
This will give you a list of all running programs. Search in that list for matlab.exe:
strfind(res,'MATLAB.exe')
On Linux you can use the top command to get the list.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!