フィルターのクリア

Alternative command to Shell Escape [!] function

6 ビュー (過去 30 日間)
grega
grega 2018 年 12 月 23 日
回答済み: Rik 2018 年 12 月 23 日
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 件のコメント
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 日
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.

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by