autoexit after script runs

edited April 2008 in Science & Tech
Hello
I have a matlab scritp that is called from a shell script. The problem is that matlab will not exit after the script is finished executing and so the driving shell script hangs. I've tried 'quit' and 'exit' at the end of the matlab script and after the call to matlab in the shell scritp and nothing seems to work. Does anyone know how to force matlab to quit from within the script?
thanks

Comments

  • shwaipshwaip bluffin' with my muffin Icrontian
    edited April 2008
    it sounds like the script isn't reaching the end (hence why exit and quit aren't helping). If you run the script from within matlab, does it finish properly?
  • edited April 2008
    Yes, when I run it directly, the script finishes, exits, and returns to the MATLAB command prompt. I can them manually quit with no problem. The problem is that the driving shell script doesn't know the code is finished because MATLAB just sits idle instead of exiting. What I need to be able to do is to exit MATLAB from within an executing MATLAB program or something like that (ie: exit the program and then exit MATLAB automatically). Thanks for the help.
Sign In or Register to comment.