interactive vs batch ?
8 ビュー (過去 30 日間)
古いコメントを表示
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();"
回答 (1 件)
Walter Roberson
2012 年 1 月 24 日
2 件のコメント
Walter Roberson
2012 年 1 月 24 日
matlab -logfile $MATLAB_LOG_FILE -nosplash -nodesktop -r "try mProc();catch;end;quit"
参考
カテゴリ
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!