MATLAB Answers

Alternative command to Shell Escape [!] function

11 views (last 30 days)
grega on 23 Dec 2018
Answered: Rik on 23 Dec 2018
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];
I have tried system function, i.e.
but no luck. Thank you for any idea.
grega on 23 Dec 2018
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.

Sign in to comment.

Answers (1)

Rik on 23 Dec 2018
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.




Community Treasure Hunt

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

Start Hunting!