interactive vs batch ?
Mostrar comentarios más antiguos
Hey all;
We've been looking for a good way to select whether to call 'exit' vs. 'return' when leaving an m file. In interactive mode we want to call 'return' when debugging a batch script, and in batch mode we'd like to call 'exit'.
Since we apparently do not know what we are doing :) we have a lot of these:
if( interactive ), return;, else, exit;, end
laying around, where 'interactive' is a variable we have kluuged up. Clearly this added apparatus of ours is not optimal. If we could detect the '-nodesktop' setting from within an m file, then we could automate it a little more. I suspect we are barking up the wrong tree altogether.
What's the big picture, what are we missing? THANK YOU
Oh, We invoke batch processing from bash on Ubuntu 10.04 thus:
matlab -logfile $MATLAB_LOG_FILE -nosplash -nodesktop -r "mProc();"
3 comentarios
Andrew Newell
el 23 de En. de 2012
Why do you need to use exit at all?
Clark
el 24 de En. de 2012
Clark
el 24 de En. de 2012
Respuestas (1)
Walter Roberson
el 24 de En. de 2012
0 votos
2 comentarios
Walter Roberson
el 24 de En. de 2012
matlab -logfile $MATLAB_LOG_FILE -nosplash -nodesktop -r "try mProc();catch;end;quit"
Clark
el 24 de En. de 2012
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!