-r vs -batch when calling matlab in unix

조회 수: 15 (최근 30일)
August Brandberg
August Brandberg 2020년 3월 20일
댓글: August Brandberg 2020년 3월 25일
I am aware that matlab -r scriptName(arg1,...) is no longer recommended for non-interactive jobs on unix systems, and that I should use -batch instead (see https://se.mathworks.com/help/matlab/ref/matlablinux.html ).
However, I have been unable to find why that is better. Could someone point me in the right direction?

채택된 답변

Edric Ellis
Edric Ellis 2020년 3월 23일
(I'm not an expert here, just a user of the -batch option) The main advantages for me of the -batch option compared to -r for non-interactive cases are:
  • it more concisely sets up the -nosplash and -nodisplay options (even on Windows)
  • removes the startup banner
  • ensures the MATLAB process exits (with an exit code) even if your statement throws an error
All told, it's just more convenient.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by