FUNCTION REFERENCE

tempname

Generate a unique temporary path without creating a file.

Generate a unique temporary path without creating a file.

Syntax

name = tempname

Syntax

name = tempname(folder)

Uses the supplied folder or the host temporary folder. Names include process, time and sequence components. A name is not a reservation: another process can still create it.

Example

a=tempname(pwd); b=tempname(pwd); strcmp(a,b)   % 0

Differences from MATLAB: The generated name format differs from MATLAB.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.