?? getsubdirs.m
字號:
function dirlist = getsubdirs(dirname)
%GETSUBDIRS Recursively get all subdirectories of a directory
% Copyright 2003
fs = filesep;
files = dir(dirname);
subdirs = files(logical([files.isdir]));
dirlist = {dirname};
% ~strcmp(this,'..') strcmp(this(1),'h')
if ~isempty(subdirs)
for n = 1:length(subdirs)
% Short circuit directories on the stop list
this = subdirs(n).name;
if ~strcmp(this(1),'@') && ...
~strcmp(this,'.') && ...
~strcmp(this,'..')
dirlist = [dirlist; ...
getsubdirs([dirname fs this])];
% disp([dirname filesep this])
end
end
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -