interactive vs batch ?
Mostra commenti meno recenti
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 Commenti
Andrew Newell
il 23 Gen 2012
Why do you need to use exit at all?
Clark
il 24 Gen 2012
Clark
il 24 Gen 2012
Risposte (1)
Walter Roberson
il 24 Gen 2012
0 voti
2 Commenti
Walter Roberson
il 24 Gen 2012
matlab -logfile $MATLAB_LOG_FILE -nosplash -nodesktop -r "try mProc();catch;end;quit"
Clark
il 24 Gen 2012
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!