how to run .exe file in matlab

391 ビュー (過去 30 日間)
saima
saima 2011 年 11 月 11 日
回答済み: Glorio_sebastien 2019 年 8 月 6 日
can anyone plz tell me how to run .exe file in matlab regards

回答 (3 件)

Drew Weymouth
Drew Weymouth 2011 年 11 月 11 日
The built in function system(command) will execute the given command (a string) in a windows command prompt. So you might have system('"myexe.exe" arg0 arg1') where myexe.exe is the file you want to run, and arg0 and arg1 are input arguments (strings) to that exe. Type help system in the MATLAB command window for more details.
  2 件のコメント
Jan
Jan 2011 年 11 月 11 日
And SYSTEM even works under Linux.
Walter Roberson
Walter Roberson 2011 年 11 月 11 日
But .exe files don't work under Linux ;-)

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


Joao
Joao 2017 年 9 月 28 日
And how can one evaluate when the executable finishes running/windows command prompt is closed? I've tried [status output]=system(command), but with no luck for running executables.
  1 件のコメント
Walter Roberson
Walter Roberson 2017 年 9 月 28 日
If you do not add & to the end of the command line, then executables that are set up to run as Windows command line executables will not return from system() until they have completed.
However, if you have added & to the end of the command line, or you are using an .exe that is configured to run as an "application", then the return will be as soon as initialization has finished, and there is no notification to MATLAB of when the executable terminates. In such a situation, to figure out whether the executable is still executing you would need to use taskmgr on MS Windows.

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


Glorio_sebastien
Glorio_sebastien 2019 年 8 月 6 日
system('model.exe')

カテゴリ

Help Center および File ExchangeApplication Deployment についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by