Batch runs- Matlab busy

3 ビュー (過去 30 日間)
Elvina
Elvina 2015 年 8 月 25 日
コメント済み: Elvina 2015 年 8 月 25 日
I'm running a batch file via Matlab 2014a using the dos command, which works fine and gives the correct results, but there is a problem with the batch file and it doesn't close after it has produced the desired outputs. It seems to be perpetually closing the outputfiles, and Matlab remains "Busy" for a very long time.
Is there a way of putting a conditional statement in my code to end the batch run as soon as this message appears int he command window? I am unable to change the actual batch file so I would just like a statement to add to my script.
Thank you in advance!

採用された回答

Nobel Mondal
Nobel Mondal 2015 年 8 月 25 日
編集済み: Nobel Mondal 2015 年 8 月 25 日
If you call the batch file with "&", the job will be launched in a different shell and it will free matlab prompt immediately. Example:
>> dos('myBatchFile.bat &')
The downside with this is : you will see a windows command prompt opening up and running the job.
  1 件のコメント
Elvina
Elvina 2015 年 8 月 25 日
Ah, thank you. Doesn't close the batch run but frees up Matlab as you said.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by