?? tempdir2.m
字號:
function tempDir2 = tempdir2%TEMPDIR2 Return temporary directory.% DIR = TEMPDIR2 returns as a temporary directory the directory% <TEMPDIR>/<USERNAME>@<HOSTNAME>/MATLAB. This directory is user- and% host-specific and thus better suited in networks/clusters than the% temporary directory returned by Matlab function TEMPDIR.%% Markus Buehren% Last modified 20.04.2008%% See also TEMPDIR, GETUSERNAME, GETHOSTNAME.persistent tempDir2Persistentif isempty(tempDir2Persistent) % build directory string tempDir2 = tempdir; tempDir2 = fullfile(tempDir2, [getusername '@' gethostname], 'MATLAB'); % if directory is not existing, try to create it if ~exist(tempDir2, 'dir') try mkdir(tempDir2); catch error('Unable to create directory %s.', tempDir2); end end % save string for next function call tempDir2Persistent = tempDir2;else % return string computed before tempDir2 = tempDir2Persistent;end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -