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

조회 수: 3 (최근 30일)
Sinan
Sinan 2012년 10월 21일
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일
system('old_executable &')
  댓글 수: 3
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개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by