Determine if MATLAB started with -batch
option
batchStartupOptionUsed
returns true
when
MATLAB® starts with -batch
option. Otherwise, the function returns
false
. Use the -batch
option to start MATLAB non-interactively.
Use this function to guard code from being executed when MATLAB is running non-interactively with the -batch
startup option
and user input is either not desired or not supported in this mode.
matlab (Linux)
| matlab (macOS)
| matlab (Windows)
| isdeployed
(MATLAB Compiler SDK) | ismcc
(MATLAB Compiler SDK)