How to wait for external exe program output in matlab ??
5 ビュー (過去 30 日間)
古いコメントを表示
Abhimanyu Kashyap
2013 年 5 月 14 日
コメント済み: Walter Roberson
2017 年 6 月 29 日
I am running NASTRAN from MATLAB.. My problem is that I want to run NASTRAN iteratively. For that I need to read NASTRAN output dat and f06 files over and again. But MATLAB goes on running continuously without waiting for the NASTRAN process to complete. So that gives error message. I want to stop MATLAB code until NASTRAN completes its work and gives the output files which I want to read from MATLAB in the next lines of codes..It has to wait until those files are generated. This runs in a loop.. I want to do this so many times. So I dont want to do it manually. Please help me.
0 件のコメント
採用された回答
Walter Roberson
2013 年 5 月 14 日
If the NASTRAN program creates a graphics window, then it gets messy to do this.
If the NASTRAN program only uses console output, then on the system() or dos() command that you use to invoke the executable, do not have a '&' in the command line.
For example,
disp(1)
system('dir')
disp(2)
the disp(2) will not execute until "dir" has finished and returned.
2 件のコメント
Jan Oltmann
2017 年 6 月 29 日
Hi,
I have the same problem. Unfortunately, your answer could not help me, because on my computer matlab never waits. I have a colleague, which computed the same matlab code and Matlab waited for the external program. Does anyone know how to solve this problem?
Walter Roberson
2017 年 6 月 29 日
If you take the same command to a Terminal window and run it there, does it wait for you?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!