How to open new terminal (visible) from Matlab Linux, Mac

조회 수: 26 (최근 30일)
Willy
Willy 2013년 8월 29일
I am currently using the following line of code to launch an application in Windows. I get to see a new terminal and the output being printed there. The cmd contains instructions to run an executable.
system([cmd '&'], '-echo')
I would like to do the same for Mac or Linux. Do you have any suggestions? I have tried the system and unix commands.
  댓글 수: 3
Walter Roberson
Walter Roberson 2013년 8월 29일
The "new terminal" on Windows is only because it is a graphical command that is being named. The -echo option of system() is to send the results to the MATLAB command window (as well), not to open a new terminal.
Walter Roberson
Walter Roberson 2013년 8월 29일
On OS-X you might have to resort to Applescript, potentially.
If you do not use Applescript then you would want to open an xterm (OS-X Leopard or earlier), or open /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal . Unfortunately I have not been able to find a mechanism to get Terminal to accept command-line options to specify what is to be run.

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

답변 (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