running an executable in "MS-Windows command window" from MATLAB

Is there a way to run an external executable code (e.g. an old Fortran code) in a "MS-Windows command window" from Matlab.
I've tried using
> system('old_executable')
This works but the output of the executable goes the Matlab Command Window, rather than the MS-Windows command window. Moreover, the Matlab Command Window becomes occupied and can't be used for other work...

 採用された回答

Jan
Jan 2012 年 10 月 21 日

0 投票

system('old_executable &')

3 件のコメント

Walter Roberson
Walter Roberson 2012 年 10 月 21 日
I don't think that would help with the destination of the standard output. I think you would need to system() cmd.exe
winopen() might work.
Jan
Jan 2012 年 10 月 22 日
@Walter: The above command opens a Windows command window, which contains all output of the called function. Example:
system('dir &')
This opens a command shell and displays the contents of the current directory there - and not in Matlab's command window. Afterwards the shell window is kept open. Therefore I think this matchs the OP's needs.
Sinan
Sinan 2012 年 10 月 22 日
system('old_executable &')
does exactly what I was looking for.
Thank you!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEnvironment and Settings についてさらに検索

質問済み:

2012 年 10 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by