Unique name for temporary file
tmpName = tempname
Create a temporary file name that has the extension,
by concatenating two strings.
tmpName = [tempname,'.dat'];
Create a temporary file name.
filename = tempname;
Create a new file with the temporary file name, and write data to the file.
fileID = fopen(filename,'w'); fwrite(fileID,magic(5)); fclose(fileID);
In most cases,
a universally unique identifier (UUID). However, if you run MATLAB® without JVM™ software,
tempname generates a random string using the
CPU counter and time, and this string is not guaranteed to be unique.
For more information about the MATLAB startup option that does
not load JVM software, see Commonly Used Startup Options.