Holding matlab execution while dos/system command is running
古いコメントを表示
Hi all,
Z (see code below) is a batch file to be executed using 'dos'. The challenge however is that V requires 'x.log' which is an output files after completely executing the batch file. What I observe is error message saying that the output file do not exist; apparently because the 'x.log' is yet to be generated by the batch file. Please How can I make matlab hold on until after the batch file has been completed so that the x.log file can be available as input to V?
z = dos('x.bat'); v = fileread('x.log')
Thank you in advance.
OlFat
採用された回答
その他の回答 (1 件)
Walter Roberson
2014 年 4 月 20 日
0 投票
dos() does wait for the end of the command. However if the command involves opening up an independent graphics window instead of working in command-line mode, then as far as MS Windows is concerned the .bat is finished. There are tools that can be used to detect whether a process is executing if necessary.
1 件のコメント
Devalla lakshmipathirao
2020 年 9 月 7 日
Could you please tell more about the tools you are talking about? Thanks.
カテゴリ
ヘルプ センター および File Exchange で Texas Instruments C2000 Processors についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!