how to run .exe file in matlab

조회 수: 154 (최근 30일)
saima
saima 2011년 11월 11일
댓글: Hemanth Reddy 2025년 2월 21일
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.
  댓글 수: 3
Walter Roberson
Walter Roberson 2011년 11월 11일
But .exe files don't work under Linux ;-)
Hemanth Reddy
Hemanth Reddy 2025년 2월 21일
이 댓글에 Steven Lord 님이 플래그를 지정함
WHY ITS TAKING MORE TIME IF WE CALL THIS EXE FILE IN VISUAL STUDIO C++?
WHEN I RUN THE SAME CODE IN MATLAB ITS TAKING LESS TIME(8 SEC) BUT WHY IF CALL THE EXE FIKLE WHICH HAS SAME CODE ITS TAKING (20 SEC). MORE TIME TO COMPLETE THE EXECUTATION.

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


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 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