Running DOS command from Matlab using system()

조회 수: 8 (최근 30일)
sam Pournazeri
sam Pournazeri 2011년 9월 13일
I am running an execution file of a Fortran code in Matlab using system(). running the dos command in Matlab takes approximately twice longer than when you run it from the command prompt window (i.e. from DOS).
Is there any way that we can speed up the process running this file from Matlab.
Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2011년 9월 13일
Odd...
Does it happen to produce a lot of output to the screen? If so then perhaps system() is getting bogged down in collecting that output, as the second output of system() can be the output of the executable. If that is what is happening, then if you do not need the output, redirect it to the null device in the system command. If I recall, in MS Windows, that would look like
system('ExecutableName > NUL:')
  댓글 수: 1
sam Pournazeri
sam Pournazeri 2011년 9월 13일
Actually, I redirect them to Nul using system('ExecutableName > NUL'), but still the DOS command prompt runs it faster.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by