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!