Alternative command to Shell Escape [!] function

Is there alternative to Shell Escape [!] function? The problem is that I cannot asign custom name programatically for execution of external program from Editor, e.g.
todays_data = ['Dec23'];
execute_program = ['myProgram_' todays_data];
!execute_program
I have tried system function, i.e.
system(execute_program)
but no luck. Thank you for any idea.

댓글 수: 6

madhan ravi
madhan ravi 2018년 12월 23일
~
grega
grega 2018년 12월 23일
Thank you for the suggestion, but it doesn't solve the problem, it behaves the same way as [!].
madhan ravi
madhan ravi 2018년 12월 23일
what does it do ? what's it's purpose ? so that a better solution can be given
grega
grega 2018년 12월 23일
편집: grega 2018년 12월 23일
After program compilation, I simply want to execute the .exe file and exit/quit the Matlab, both programatically.
Guillaume
Guillaume 2018년 12월 23일
Why doesn't system work?
Does the solution have to work on any OS or can it be OS specific?
grega
grega 2018년 12월 23일
When line system(execute_program) is execuded, the program actually executes but still witin the Matlab. If I close the Matlab, also the executed program closes, whic is bit strange.
I am working in Windows 10.

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

답변 (1개)

Rik
Rik 2018년 12월 23일

1 개 추천

On Windows you can use the start keyword to start a command in a separate thread.
Sometimes this doesn't play nice with Matlab, so you might need to write 'start YourFunction.exe' to a bat file and run that with the system command.
Then you can use exit to quit Matlab itself.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2016b

질문:

2018년 12월 23일

답변:

Rik
2018년 12월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by