ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
release.m
Go to the documentation of this file.
1%> \brief
2%> Return a scalar MATLAB string containing the
3%> MATLAB release version, year, or season as requested.
4%>
5%> \param[in] type : The input scalar MATLAB string that can be either:
6%> <ol>
7%> <li> the string ``"year"``, implying that the MATLAB release year must be returned.<br>
8%> <li> the string ``"season"`` or ``"minor"``, implying that the MATLAB release season must be returned.<br>
9%> </ol>
10%> (**optional**. default = ``""`` implying the full version.)
11%>
12%> \return
13%> ``matlabRelease`` : The output scalar MATLAB string containing the
14%> MATLAB release version, year, or season as requested.
15%>
16%> \interface{release}
17%> \code{.m}
18%>
19%> matlabRelease = pm.matlab.release()
20%> matlabRelease = pm.matlab.release(type)
21%>
22%> \endcode
23%>
24%> \example{release}
25%> \include{lineno} example/matlab/release/main.m
26%> \output{release}
27%> \include{lineno} example/matlab/release/main.out.m
28%>
29%> \final{release}
30%>
31%> \author
32%> \JoshuaOsborne, May 21 2024, 11:19 PM, University of Texas at Arlington<br>
33%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
34%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
35function matlabRelease = release(type)
36 if nargin < 1
37 type = "";
38 end
39 % WARNING: Do NOT convert the input char '-release' to string or the output will be wrong.
40 matlabRelease = version('-release');
41 if string(type) == "year"
42 matlabRelease = matlabRelease(1:4);
43 elseif string(type) == "season" || string(type) == "minor"
44 matlabRelease = matlabRelease(5:5);
45 elseif type ~= ""
46 disp("type = ");
47 disp(type);
48 error("Invalid input value for the argument ``type`` of getMatlabRelease().");
49 end
50 matlabRelease = string(matlabRelease);
51end
function version(in silent)
Return a scalar MATLAB string containing the latest available ParaMonte MATLAB version newer than the...
function release(in type)
Return a scalar MATLAB string containing the MATLAB release version, year, or season as requested.