2%> Return a scalar MATLAB
string containing
3%> a file
name based on the current date and time.
6%> This functionality is primarily used by the ParaMonte
7%> samplers to generate random output file base
name for
8%> situations where the user does not specify a
name.
10%> \param[in] prefix : The input scalar MATLAB string,
11%> containing the desired prefix, e.g.,
12%> ParaDRAM, ParaDISE, ParaNest, ...<br>
13%> (**optional**,
default = ``
""``)
16%> ``str`` : The output scalar MATLAB
string containing
17%> an output file
name based on the current date and time.<br>
18%> The following represents the
template used across
19%> all programming language environments:<br>
25%> prefix_YYYYMMDD_HHMMSS_MMM
29%> <li> ``prefix`` is replaced with the input ``prefix``
name.
30%> <li> ``YYYY`` is replaced with the current Gregorian year.
31%> <li> ``MM`` is replaced with the current month of year.
32%> <li> ``DD`` is replaced with the current day of month.
33%> <li> ``HH`` is replaced with the current hour of day.
34%> <li> ``MM`` is replaced with the current minute of hour.
35%> <li> ``SS`` is replaced with the current second of minute.
36%> <li> ``MMM`` is replaced with the current millisecond of second.
42%> str = pm.io.getFileName()
43%> str = pm.io.getFileName([])
44%> str = pm.io.getFileName(prefix)
51%> \include{lineno} example/io/
getFileName/main.out.m
56%> \JoshuaOsborne, May 21 2024, 6:13 PM, University of Texas at Arlington<br>
57%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
58%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
63 str = datestr(now,
'yyyymmdd_HHMMSS_FFF');
64 % MATLAB recommends replacing the above with the following.
65 % The plan was to keep the old syntax as it is not clear
66 % when the
new syntax was instroduces.
67 %str = string(datetime(
'now',
'format',
'yyyyMMdd_HHmmss_SSS'))
69 str =
string(prefix) + "_" + str;
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function getFileName(in prefix)
Return a scalar MATLAB string containing a file name based on the current date and time.