Kill script from outside script
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all
I have the following problem. I start a Matlab exe-file (from matlab compiler), which creates a place holder function. That function then waits for input and when it gets it, it starts a script inside it. The reason I do it this way is that it takes a long time to start matlab before the actual execution can start if I don't, and I want the script to run as soon as the input arrives. Now, I want to be able to stop the "inner" script without killing the place holder function. Can I do that, and in that case, how?
I can't litter the code with error conditions because I might want to kill the process when it's doing a long loop in a function I don't have access to.
If that's not possible, is there any other way of speeding up the startup in matlab compiler .exe files?
0 件のコメント
回答 (1 件)
Sumit Tandon
2012 年 7 月 26 日
Have you considered using a combination of flags (being set by external inputs) and break/continue statements?
Before starting the EXE created using MATLAB Compiler, MCR needs to be started in the background. MCR is a head-less version of MATLAB. The start-up time for MCR is going to be similar to MATLAB.
2 件のコメント
Sumit Tandon
2012 年 7 月 26 日
Unfortunately there is no way to start the MCR before the EXE - since its "in-process" MCR. You cannot start the MCR as a background process and then start the EXE. You will need to start the EXE (together with MCR) and then wait for the input to come, just like you are doing now.
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!