ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
iscmd.m
Go to the documentation of this file.
1%> \brief
2%> Return a scalar MATLAB logical ``true`` if and only if the
3%> the MATLAB binary is being called from the shell command-line,
4%> in ``batch`` mode (without Graphical User Interface (GUI) interface).<br>
5%> Otherwise, return ``false`` implying that MATLAB GUI engine is active.<br>
6%>
7%> \details
8%> This functionality is important for certain library
9%> features that require MATLAB to be called from the
10%> command-line, e.g., MPI-parallel functionalities.<br>
11%>
12%> \warning
13%> This function relies on functionalities
14%> that are supported only in MATLAB > 2019a.<br>
15%>
16%> \return
17%> ``itis`` : The output scalar MATLAB logical that is ``true``
18%> if and only if ParaMonte MATLAB library is being called
19%> from MATLAB Graphical User Interface (GUI), otherwise, ``false``.<br>
20%>
21%> \interface{iscmd}
22%> \code{.m}
23%>
24%> itis = pm.matlab.iscmd()
25%>
26%> \endcode
27%>
28%> \example{iscmd}
29%> \include{lineno} example/matlab/iscmd/main.m
30%> \output{iscmd}
31%> \include{lineno} example/matlab/iscmd/main.out.m
32%>
33%> \final{iscmd}
34%>
35%> \author
36%> \JoshuaOsborne, May 21 2024, 11:38 PM, University of Texas at Arlington<br>
37%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
38%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
39function itis = iscmd()
40 try
41 %%%% This error catching can be removed once
42 %%%% no MATLAB < R2019a is expected to call it.
43 %%%% ``batchStartupOptionUsed`` is introduced in R2019a and not supported in older versions of MATLAB.
44 itis = batchStartupOptionUsed;
45 catch
46 try
47 itis = ~pm.matlab.isgui();
48 catch
49 itis = isdeployed();
50 end
51 end
52end
function iscmd()
Return a scalar MATLAB logical true if and only if the the MATLAB binary is being called from the she...
function parallel()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...