How to run .exe file with various input files and one output file in MATLAB

조회 수: 1 (최근 30일)
naman
naman 2013년 10월 22일
댓글: dpb 2013년 10월 22일
I have an abc.exe file which uses 3 input text files say p.txt q.txt and r.txt and generate z.txt as an output file.
This is working fine in Linux but how to do it in MATLAB. I ran it with system command as:
status = system('abc.exe p.txt q.txt r.txt z.txt') and
status = system('abc.exe ' 'p.txt ' 'q.txt ' 'r.txt ' 'z.txt')
In both cases, it does not generate z.txt and value of status is not zero.
How to rectify this ?
  댓글 수: 1
dpb
dpb 2013년 10월 22일
Return the optional message for further info on why it failed.
Likely guesses are that the path isn't set in the spawned session so the executable and/or the data files aren't found.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by