Kill script from outside script
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Sumit Tandon
on 26 Jul 2012
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 Comments
Sumit Tandon
on 26 Jul 2012
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.
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!